diff options
Diffstat (limited to 'utils')
-rw-r--r-- | utils/container.c | 52 | ||||
-rw-r--r-- | utils/filename.c | 25 | ||||
-rw-r--r-- | utils/hashtable.c | 8 | ||||
-rw-r--r-- | utils/idna.c | 22 | ||||
-rw-r--r-- | utils/log.h | 9 | ||||
-rw-r--r-- | utils/messages.c | 12 | ||||
-rw-r--r-- | utils/nsoption.c | 8 | ||||
-rw-r--r-- | utils/nsurl.c | 49 | ||||
-rw-r--r-- | utils/useragent.c | 2 | ||||
-rw-r--r-- | utils/utf8.c | 4 | ||||
-rw-r--r-- | utils/utils.c | 2 |
11 files changed, 93 insertions, 100 deletions
diff --git a/utils/container.c b/utils/container.c index e5894ec7e..5946d12f9 100644 --- a/utils/container.c +++ b/utils/container.c @@ -85,26 +85,26 @@ inline static size_t container_filelen(FILE *fd) o = ftell(fd); if (o == -1) { - LOG(("Could not get current stream position")); + LOG("Could not get current stream position"); return 0; } if (fseek(fd, 0, SEEK_END) != 0) { - LOG(("Could not get seek to end of file")); + LOG("Could not get seek to end of file"); return 0; } a = ftell(fd); if (fseek(fd, o, SEEK_SET) != 0) { - LOG(("Could not reset seek position in file")); + LOG("Could not reset seek position in file"); return 0; } if (a == -1) { - LOG(("could not ascertain size of file in theme container; omitting")); + LOG("could not ascertain size of file in theme container; omitting"); return 0; } if (((unsigned long) a) > SIZE_MAX) { - LOG(("overlarge file in theme container; possible truncation")); + LOG("overlarge file in theme container; possible truncation"); return SIZE_MAX; } return (size_t) a; @@ -155,24 +155,24 @@ struct container_ctx *container_open(const char *filename) val = fread(&ctx->header.magic, 4, 1, ctx->fh); if (val == 0) - LOG(("empty read magic")); + LOG("empty read magic"); ctx->header.magic = ntohl(ctx->header.magic); val = fread(&ctx->header.parser, 4, 1, ctx->fh); if (val == 0) - LOG(("empty read parser")); + LOG("empty read parser"); ctx->header.parser = ntohl(ctx->header.parser); val = fread(ctx->header.name, 32, 1, ctx->fh); if (val == 0) - LOG(("empty read name")); + LOG("empty read name"); val = fread(ctx->header.author, 64, 1, ctx->fh); if (val == 0) - LOG(("empty read author")); + LOG("empty read author"); val = fread(&ctx->header.diroffset, 4, 1, ctx->fh); if (val == 0) - LOG(("empty read diroffset")); + LOG("empty read diroffset"); ctx->header.diroffset = ntohl(ctx->header.diroffset); if (ctx->header.magic != 0x4e53544d || ctx->header.parser != 3) { @@ -200,7 +200,7 @@ static void container_process(struct container_ctx *ctx) } val = fread(ctx->data, ctx->header.diroffset, 1, ctx->fh); if (val == 0) - LOG(("empty read diroffset")); + LOG("empty read diroffset"); #endif if (fseek(ctx->fh, ctx->header.diroffset, SEEK_SET) != 0) { return; @@ -212,7 +212,7 @@ static void container_process(struct container_ctx *ctx) do { val = fread(filename, 64, 1, ctx->fh); if (val == 0) - LOG(("empty read filename")); + LOG("empty read filename"); BEREAD(start); BEREAD(len); BEREAD(flags1); @@ -300,7 +300,7 @@ static void container_write_dir(struct container_ctx *ctx) struct container_dirent *e = ctx->directory + i - 1; val = fwrite(e->filename, 64, 1, ctx->fh); if (val == 0) - LOG(("empty write filename")); + LOG("empty write filename"); BEWRITE(e->startoffset); BEWRITE(e->len); BEWRITE(e->flags1); @@ -311,7 +311,7 @@ static void container_write_dir(struct container_ctx *ctx) tmp = 0; val = fwrite(&tmp, 4, 8, ctx->fh); if (val == 0) - LOG(("empty write end")); + LOG("empty write end"); } struct container_ctx *container_create(const char *filename, @@ -343,16 +343,16 @@ struct container_ctx *container_create(const char *filename, val = fwrite("NSTM", 4, 1, ctx->fh); if (val == 0) - LOG(("empty write NSTM")); + LOG("empty write NSTM"); val = fwrite(&ctx->header.parser, 4, 1, ctx->fh); if (val == 0) - LOG(("empty write parser")); + LOG("empty write parser"); val = fwrite(ctx->header.name, 32, 1, ctx->fh); if (val == 0) - LOG(("empty write name")); + LOG("empty write name"); val = fwrite(ctx->header.author, 64, 1, ctx->fh); if (val == 0) - LOG(("empty write author")); + LOG("empty write author"); ctx->header.diroffset = 108; @@ -361,7 +361,7 @@ struct container_ctx *container_create(const char *filename, */ if (fseek(ctx->fh, 108, SEEK_SET) == -1) { - LOG(("directory offset seek failed")); + LOG("directory offset seek failed"); free(ctx); return NULL; } @@ -377,7 +377,7 @@ void container_add(struct container_ctx *ctx, const unsigned char *entryname, container_add_to_dir(ctx, entryname, ftell(ctx->fh), datalen); val = fwrite(data, datalen, 1, ctx->fh); if (val == 0) - LOG(("empty write add file")); + LOG("empty write add file"); } void container_close(struct container_ctx *ctx) @@ -394,7 +394,7 @@ void container_close(struct container_ctx *ctx) nflen = htonl(flen); val = fwrite(&nflen, 4, 1, ctx->fh); if (val == 0) - LOG(("empty write directory location")); + LOG("empty write directory location"); /* seek to where the directory will be, and write it */ if (fseek(ctx->fh, flen, SEEK_SET) == 0) { @@ -448,8 +448,8 @@ char *container_extract_theme(const char *themefile, const char *dirbasename) container_close(cctx); return NULL; } - LOG(("theme name: %s", themename)); - LOG(("theme author: %s", container_get_author(cctx))); + LOG("theme name: %s", themename); + LOG("theme author: %s", container_get_author(cctx)); dirname = malloc(strlen(dirbasename) + strlen(themename) + 2); if (dirname == NULL) { @@ -478,7 +478,7 @@ char *container_extract_theme(const char *themefile, const char *dirbasename) for (e = container_iterate(cctx, &state), i = 0; i < cctx->entries; e = container_iterate(cctx, &state), i++) { - LOG(("extracting %s", e)); + LOG("extracting %s", e); snprintf(path, PATH_MAX, "%s/%s", dirname, e); fh = fopen(path, "wb"); if (fh == NULL) { @@ -487,11 +487,11 @@ char *container_extract_theme(const char *themefile, const char *dirbasename) d = container_get(cctx, e, &flen); val = fwrite(d, flen, 1, fh); if (val == 0) - LOG(("empty write")); + LOG("empty write"); fclose(fh); } } - LOG(("theme container unpacked")); + LOG("theme container unpacked"); container_close(cctx); free(dirname); return themename; diff --git a/utils/filename.c b/utils/filename.c index 5efd56177..19ee03968 100644 --- a/utils/filename.c +++ b/utils/filename.c @@ -85,7 +85,7 @@ const char *filename_request(void) /* no available slots - create a new directory */ dir = filename_create_directory(NULL); if (dir == NULL) { - LOG(("Failed to create a new directory.")); + LOG("Failed to create a new directory."); return NULL; } i = 63; @@ -183,11 +183,10 @@ bool filename_initialise(void) for (start = directory; *start != '\0'; start++) { if (*start == '/') { *start = '\0'; - LOG(("Creating \"%s\"", directory)); + LOG("Creating \"%s\"", directory); ret = nsmkdir(directory, S_IRWXU); if (ret != 0 && errno != EEXIST) { - LOG(("Failed to create directory \"%s\"", - directory)); + LOG("Failed to create directory \"%s\"", directory); free(directory); return false; } @@ -196,7 +195,7 @@ bool filename_initialise(void) } } - LOG(("Temporary directory location: %s", directory)); + LOG("Temporary directory location: %s", directory); ret = nsmkdir(directory, S_IRWXU); free(directory); @@ -282,7 +281,7 @@ bool filename_flush_directory(const char *folder, int depth) child[sizeof(child) - 1] = '\0'; if (stat(child, &statbuf) == -1) { - LOG(("Unable to stat %s: %s", child, strerror(errno))); + LOG("Unable to stat %s: %s", child, strerror(errno)); continue; } @@ -350,7 +349,7 @@ bool filename_flush_directory(const char *folder, int depth) filename_delete_recursive(child); if (remove(child)) - LOG(("Failed to remove '%s'", child)); + LOG("Failed to remove '%s'", child); else changed = true; } else { @@ -389,7 +388,7 @@ bool filename_delete_recursive(char *folder) child[sizeof(child) - 1] = '\0'; if (stat(child, &statbuf) == -1) { - LOG(("Unable to stat %s: %s", child, strerror(errno))); + LOG("Unable to stat %s: %s", child, strerror(errno)); continue; } @@ -401,7 +400,7 @@ bool filename_delete_recursive(char *folder) } if (remove(child)) { - LOG(("Failed to remove '%s'", child)); + LOG("Failed to remove '%s'", child); closedir(parent); return false; } @@ -467,7 +466,7 @@ static struct directory *filename_create_directory(const char *prefix) /* allocate a new directory */ new_dir = malloc(sizeof(struct directory)); if (new_dir == NULL) { - LOG(("No memory for malloc()")); + LOG("No memory for malloc()"); return NULL; } @@ -501,8 +500,7 @@ static struct directory *filename_create_directory(const char *prefix) * whilst we are running if there is an error, so we * don't report this yet and try to create the * structure normally. */ - LOG(("Failed to create optimised structure '%s'", - filename_directory)); + LOG("Failed to create optimised structure '%s'", filename_directory); } } @@ -522,8 +520,7 @@ static struct directory *filename_create_directory(const char *prefix) if (!is_dir(filename_directory)) { if (nsmkdir(filename_directory, S_IRWXU)) { - LOG(("Failed to create directory '%s'", - filename_directory)); + LOG("Failed to create directory '%s'", filename_directory); return NULL; } } diff --git a/utils/hashtable.c b/utils/hashtable.c index 23b83b32e..d807904a2 100644 --- a/utils/hashtable.c +++ b/utils/hashtable.c @@ -87,7 +87,7 @@ struct hash_table *hash_create(unsigned int chains) struct hash_table *r = malloc(sizeof(struct hash_table)); if (r == NULL) { - LOG(("Not enough memory for hash table.")); + LOG("Not enough memory for hash table."); return NULL; } @@ -95,7 +95,7 @@ struct hash_table *hash_create(unsigned int chains) r->chain = calloc(chains, sizeof(struct hash_entry *)); if (r->chain == NULL) { - LOG(("Not enough memory for %d hash table chains.", chains)); + LOG("Not enough memory for %d hash table chains.", chains); free(r); return NULL; } @@ -156,7 +156,7 @@ bool hash_add(struct hash_table *ht, const char *key, const char *value) e = malloc(sizeof(struct hash_entry)); if (e == NULL) { - LOG(("Not enough memory for hash entry.")); + LOG("Not enough memory for hash entry."); return false; } @@ -166,7 +166,7 @@ bool hash_add(struct hash_table *ht, const char *key, const char *value) v = strlen(value) ; e->pairing = malloc(v + e->key_length + 2); if (e->pairing == NULL) { - LOG(("Not enough memory for string duplication.")); + LOG("Not enough memory for string duplication."); free(e); return false; } diff --git a/utils/idna.c b/utils/idna.c index b8bfbd13c..d8d4ae497 100644 --- a/utils/idna.c +++ b/utils/idna.c @@ -60,17 +60,17 @@ static nserror punycode_status_to_nserror(enum punycode_status status) break; case punycode_bad_input: - LOG(("Bad input")); + LOG("Bad input"); ret = NSERROR_BAD_ENCODING; break; case punycode_big_output: - LOG(("Output too big")); + LOG("Output too big"); ret = NSERROR_BAD_SIZE; break; case punycode_overflow: - LOG(("Overflow")); + LOG("Overflow"); ret = NSERROR_NOSPACE; break; @@ -434,7 +434,7 @@ static bool idna__is_valid(int32_t *label, size_t len) /* 2. Check characters 3 and 4 are not '--'. */ if ((label[2] == 0x002d) && (label[3] == 0x002d)) { - LOG(("Check failed: characters 2 and 3 are '--'")); + LOG("Check failed: characters 2 and 3 are '--'"); return false; } @@ -444,7 +444,7 @@ static bool idna__is_valid(int32_t *label, size_t len) if ((unicode_props->category == UTF8PROC_CATEGORY_MN) || (unicode_props->category == UTF8PROC_CATEGORY_MC) || (unicode_props->category == UTF8PROC_CATEGORY_ME)) { - LOG(("Check failed: character 0 is a combining mark")); + LOG("Check failed: character 0 is a combining mark"); return false; } @@ -453,14 +453,14 @@ static bool idna__is_valid(int32_t *label, size_t len) /* 4. Check characters not DISALLOWED by RFC5892 */ if (idna_prop == IDNA_P_DISALLOWED) { - LOG(("Check failed: character %d (%x) is DISALLOWED", i, label[i])); + LOG("Check failed: character %zd (%x) is DISALLOWED", i, label[i]); return false; } /* 5. Check CONTEXTJ characters conform to defined rules */ if (idna_prop == IDNA_P_CONTEXTJ) { if (idna__contextj_rule(label, i, len) == false) { - LOG(("Check failed: character %d (%x) does not conform to CONTEXTJ rule", i, label[i])); + LOG("Check failed: character %zd (%x) does not conform to CONTEXTJ rule", i, label[i]); return false; } } @@ -469,14 +469,14 @@ static bool idna__is_valid(int32_t *label, size_t len) /** \todo optionally we can check conformance to this rule */ if (idna_prop == IDNA_P_CONTEXTO) { if (idna__contexto_rule(label[i]) == false) { - LOG(("Check failed: character %d (%x) has no CONTEXTO rule defined", i, label[i])); + LOG("Check failed: character %zd (%x) has no CONTEXTO rule defined", i, label[i]); return false; } } /* 7. Check characters are not UNASSIGNED */ if (idna_prop == IDNA_P_UNASSIGNED) { - LOG(("Check failed: character %d (%x) is UNASSIGNED", i, label[i])); + LOG("Check failed: character %zd (%x) is UNASSIGNED", i, label[i]); return false; } @@ -585,7 +585,7 @@ static bool idna__verify(const char *label, size_t len) return true; } - LOG(("Re-encoded ACE label %s does not match input", ace)); + LOG("Re-encoded ACE label %s does not match input", ace); free(ace); return false; @@ -638,7 +638,7 @@ idna_encode(const char *host, size_t len, char **ace_host, size_t *ace_len) /* This is already a DNS-valid ASCII string */ if ((idna__is_ace(host, label_len) == true) && (idna__verify(host, label_len) == false)) { - LOG(("Cannot verify ACE label %s", host)); + LOG("Cannot verify ACE label %s", host); return NSERROR_BAD_URL; } strncpy(fqdn_p, host, label_len); diff --git a/utils/log.h b/utils/log.h index 673419b66..1fd1415fd 100644 --- a/utils/log.h +++ b/utils/log.h @@ -44,7 +44,7 @@ typedef bool(nslog_ensure_t)(FILE *fptr); extern nserror nslog_init(nslog_ensure_t *ensure, int *pargc, char **argv); #ifdef NDEBUG -# define LOG(x) ((void) 0) +# define LOG(format, ...) ((void) 0) #else /** @@ -53,7 +53,8 @@ extern nserror nslog_init(nslog_ensure_t *ensure, int *pargc, char **argv); * \return formatted string of the time since first log call */ extern const char *nslog_gettime(void); -extern void nslog_log(const char *format, ...); + +extern void nslog_log(const char *format, ...) __attribute__ ((format (printf, 1, 2))); # ifdef __GNUC__ # define LOG_FN __PRETTY_FUNCTION__ @@ -66,12 +67,12 @@ extern void nslog_log(const char *format, ...); # define LOG_LN __LINE__ # endif -#define LOG(x) \ +#define LOG(format, args...) \ do { \ if (verbose_log) { \ nslog_log("%s " __FILE__ " %s %i: ", \ nslog_gettime(), LOG_FN, LOG_LN); \ - nslog_log x; \ + nslog_log(format , ##args); \ nslog_log("\n"); \ } \ } while(0) diff --git a/utils/messages.c b/utils/messages.c index c6232979d..78b9a79f0 100644 --- a/utils/messages.c +++ b/utils/messages.c @@ -61,8 +61,7 @@ static nserror messages_load_ctx(const char *path, struct hash_table **ctx) fp = gzopen(path, "r"); if (!fp) { - LOG(("Unable to open messages file \"%.100s\": %s", - path, strerror(errno))); + LOG("Unable to open messages file \"%.100s\": %s", path, strerror(errno)); return NSERROR_NOT_FOUND; } @@ -77,7 +76,7 @@ static nserror messages_load_ctx(const char *path, struct hash_table **ctx) nctx = *ctx; } if (nctx == NULL) { - LOG(("Unable to create hash table for messages file %s", path)); + LOG("Unable to create hash table for messages file %s", path); gzclose(fp); return NSERROR_NOMEM; } @@ -96,8 +95,7 @@ static nserror messages_load_ctx(const char *path, struct hash_table **ctx) value = colon + 1; if (hash_add(nctx, s, value) == false) { - LOG(("Unable to add %s:%s to hash table of %s", - s, value, path)); + LOG("Unable to add %s:%s to hash table of %s", s, value, path); gzclose(fp); if (*ctx == NULL) { hash_destroy(nctx); @@ -151,7 +149,7 @@ nserror messages_load(const char *path) if (path == NULL) { err = NSERROR_BAD_PARAMETER; } else { - LOG(("Loading Messages from '%s'", path)); + LOG("Loading Messages from '%s'", path); err = messages_load_ctx(path, &messages_hash); } @@ -176,7 +174,7 @@ char *messages_get_buff(const char *key, ...) buff = malloc(buff_len + 1); if (buff == NULL) { - LOG(("malloc failed")); + LOG("malloc failed"); warn_user("NoMemory", 0); } else { va_start(ap, key); diff --git a/utils/nsoption.c b/utils/nsoption.c index 72a591d04..416e18dd7 100644 --- a/utils/nsoption.c +++ b/utils/nsoption.c @@ -601,11 +601,11 @@ nsoption_read(const char *path, struct nsoption_s *opts) fp = fopen(path, "r"); if (!fp) { - LOG(("Failed to open file '%s'", path)); + LOG("Failed to open file '%s'", path); return NSERROR_NOT_FOUND; } - LOG(("Successfully opened '%s' for Options file", path)); + LOG("Successfully opened '%s' for Options file", path); while (fgets(s, 100, fp)) { char *colon, *value; @@ -667,7 +667,7 @@ nsoption_write(const char *path, fp = fopen(path, "w"); if (!fp) { - LOG(("failed to open file '%s' for writing", path)); + LOG("failed to open file '%s' for writing", path); return NSERROR_NOT_FOUND; } @@ -737,7 +737,7 @@ nsoption_commandline(int *pargc, char **argv, struct nsoption_s *opts) /* arg+arglen is the option to set, val is the value */ - LOG(("%.*s = %s", arglen, arg, val)); + LOG("%.*s = %s", arglen, arg, val); for (entry_loop = 0; entry_loop < NSOPTION_LISTEND; diff --git a/utils/nsurl.c b/utils/nsurl.c index 8e3c21132..e0e147229 100644 --- a/utils/nsurl.c +++ b/utils/nsurl.c @@ -511,19 +511,19 @@ static void nsurl__get_string_markers(const char * const url_s, } #ifdef NSURL_DEBUG - LOG(("marker.start: %i", marker.start)); - LOG(("marker.scheme_end: %i", marker.scheme_end)); - LOG(("marker.authority: %i", marker.authority)); + LOG("marker.start: %i", marker.start); + LOG("marker.scheme_end: %i", marker.scheme_end); + LOG("marker.authority: %i", marker.authority); - LOG(("marker.colon_first: %i", marker.colon_first)); - LOG(("marker.at: %i", marker.at)); - LOG(("marker.colon_last: %i", marker.colon_last)); + LOG("marker.colon_first: %i", marker.colon_first); + LOG("marker.at: %i", marker.at); + LOG("marker.colon_last: %i", marker.colon_last); - LOG(("marker.path: %i", marker.path)); - LOG(("marker.query: %i", marker.query)); - LOG(("marker.fragment: %i", marker.fragment)); + LOG("marker.path: %i", marker.path); + LOG("marker.query: %i", marker.query); + LOG("marker.fragment: %i", marker.fragment); - LOG(("marker.end: %i", marker.end)); + LOG("marker.end: %i", marker.end); #endif /* Got all the URL components pegged out now */ @@ -545,8 +545,8 @@ static size_t nsurl__remove_dot_segments(char *path, char *output) while (*path_pos != '\0') { #ifdef NSURL_DEBUG - LOG((" in:%s", path_pos)); - LOG(("out:%.*s", output_pos - output, output)); + LOG(" in:%s", path_pos); + LOG("out:%.*s", output_pos - output, output); #endif if (*path_pos == '.') { if (*(path_pos + 1) == '.' && @@ -1314,31 +1314,28 @@ static void nsurl_destroy_components(struct nsurl_components *c) static void nsurl__dump(const nsurl *url) { if (url->components.scheme) - LOG((" Scheme: %s", lwc_string_data(url->components.scheme))); + LOG(" Scheme: %s", lwc_string_data(url->components.scheme)); if (url->components.username) - LOG(("Username: %s", - lwc_string_data(url->components.username))); + LOG("Username: %s", lwc_string_data(url->components.username)); if (url->components.password) - LOG(("Password: %s", - lwc_string_data(url->components.password))); + LOG("Password: %s", lwc_string_data(url->components.password)); if (url->components.host) - LOG((" Host: %s", lwc_string_data(url->components.host))); + LOG(" Host: %s", lwc_string_data(url->components.host)); if (url->components.port) - LOG((" Port: %s", lwc_string_data(url->components.port))); + LOG(" Port: %s", lwc_string_data(url->components.port)); if (url->components.path) - LOG((" Path: %s", lwc_string_data(url->components.path))); + LOG(" Path: %s", lwc_string_data(url->components.path)); if (url->components.query) - LOG((" Query: %s", lwc_string_data(url->components.query))); + LOG(" Query: %s", lwc_string_data(url->components.query)); if (url->components.fragment) - LOG(("Fragment: %s", - lwc_string_data(url->components.fragment))); + LOG("Fragment: %s", lwc_string_data(url->components.fragment)); } #endif @@ -1608,7 +1605,7 @@ lwc_string *nsurl_get_component(const nsurl *url, nsurl_component part) lwc_string_ref(url->components.fragment) : NULL; default: - LOG(("Unsupported value passed to part param.")); + LOG("Unsupported value passed to part param."); assert(0); } @@ -1674,7 +1671,7 @@ bool nsurl_has_component(const nsurl *url, nsurl_component part) return false; default: - LOG(("Unsupported value passed to part param.")); + LOG("Unsupported value passed to part param."); assert(0); } @@ -1766,7 +1763,7 @@ nserror nsurl_join(const nsurl *base, const char *rel, nsurl **joined) assert(rel != NULL); #ifdef NSURL_DEBUG - LOG(("base: \"%s\", rel: \"%s\"", nsurl_access(base), rel)); + LOG("base: \"%s\", rel: \"%s\"", nsurl_access(base), rel); #endif /* Peg out the URL sections */ diff --git a/utils/useragent.c b/utils/useragent.c index 16ed67a75..72e45aada 100644 --- a/utils/useragent.c +++ b/utils/useragent.c @@ -65,7 +65,7 @@ user_agent_build_string(void) core_user_agent_string = ua_string; - LOG(("Built user agent \"%s\"", core_user_agent_string)); + LOG("Built user agent \"%s\"", core_user_agent_string); } /* This is a function so that later we can override it trivially */ diff --git a/utils/utf8.c b/utils/utf8.c index 8d3d2c1f2..b1871b2d2 100644 --- a/utils/utf8.c +++ b/utils/utf8.c @@ -468,7 +468,7 @@ bool utf8_save_text(const char *utf8_text, const char *path) ret = guit->utf8->utf8_to_local(utf8_text, strlen(utf8_text), &conv); if (ret != NSERROR_OK) { - LOG(("failed to convert to local encoding, return %d", ret)); + LOG("failed to convert to local encoding, return %d", ret); return false; } @@ -476,7 +476,7 @@ bool utf8_save_text(const char *utf8_text, const char *path) if (out) { int res = fputs(conv, out); if (res < 0) { - LOG(("Warning: writing data failed")); + LOG("Warning: writing data failed"); } res = fputs("\n", out); diff --git a/utils/utils.c b/utils/utils.c index 0af9be508..f97d14ea4 100644 --- a/utils/utils.c +++ b/utils/utils.c @@ -216,7 +216,7 @@ nserror regcomp_wrapper(regex_t *preg, const char *regex, int cflags) if (r) { char errbuf[200]; regerror(r, preg, errbuf, sizeof errbuf); - LOG(("Failed to compile regexp '%s': %s\n", regex, errbuf)); + LOG("Failed to compile regexp '%s': %s\n", regex, errbuf); return NSERROR_INIT_FAILED; } return NSERROR_OK; |