From 1517ff4c184aa0cd7effbd69922ebc8aa4d6052a Mon Sep 17 00:00:00 2001 From: Patrick McCarty Date: Fri, 29 Sep 2017 14:48:42 -0700 Subject: [PATCH] Fix build issues when -DDEBUG is enabled The call to "fprint()" is a typo and should be "fprintf()". Also, the "error->message" string is an artifact from the time when telemetrics-client used glib. Now it uses libnica, which propogates errors differently. Simply remove the format specifier for now. Signed-off-by: Patrick McCarty --- src/configuration.c | 3 +-- src/telemetry.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/configuration.c b/src/configuration.c index 5a3a2cc..a28813b 100644 --- a/src/configuration.c +++ b/src/configuration.c @@ -91,8 +91,7 @@ bool read_config_from_file(char *config_file, struct configuration *config) keyfile = nc_ini_file_parse(config_file); if (!keyfile) { #ifdef DEBUG - fprintf(stderr, "ERR: Failed to read config file: %s\n", - error->message); + fprintf(stderr, "ERR: Failed to read config file\n"); #endif return false; } else { diff --git a/src/telemetry.c b/src/telemetry.c index 0e77436..18af963 100644 --- a/src/telemetry.c +++ b/src/telemetry.c @@ -448,7 +448,7 @@ static int set_cpu_model_header(struct telem_ref *t_ref) } else { #ifdef DEBUG - fprint(stderr, "NOTICE: Unable to open /proc/cpuinfo\n"); + fprintf(stderr, "NOTICE: Unable to open /proc/cpuinfo\n"); #endif status = -1; }