Rename 'printf' field name in logger ops to 'print'.

Due the aggresive security checks in compiler 'printf' might be substituded with
'__printf_chk'. However it does not differentiate whether substituted string is
library function call whether field in structure.

By renaming field we prevent it to be unintentionally subustituted by the
preprocessor.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
This commit is contained in:
Michal Mielewczyk
2019-04-17 07:48:25 -04:00
parent ff079aa5b4
commit 5e52ac4ef2
4 changed files with 11 additions and 11 deletions

View File

@@ -31,9 +31,9 @@ typedef enum {
struct ocf_logger_ops {
int (*open)(ocf_logger_t logger);
void (*close)(ocf_logger_t logger);
int (*printf)(ocf_logger_t logger, ocf_logger_lvl_t lvl,
int (*print)(ocf_logger_t logger, ocf_logger_lvl_t lvl,
const char *fmt, va_list args);
int (*printf_rl)(ocf_logger_t logger, const char *func_name);
int (*print_rl)(ocf_logger_t logger, const char *func_name);
int (*dump_stack)(ocf_logger_t logger);
};