From: Andre Noll Date: Sun, 17 Feb 2008 21:12:39 +0000 (+0100) Subject: Kill superfluous "%s" in log messages. X-Git-Tag: v0.3.1~6 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=806fcbb5a8c00d6b8c1a228b9b4d6b6758f613ca Kill superfluous "%s" in log messages. --- diff --git a/audiod.c b/audiod.c index 65343e5c..6fd8eef1 100644 --- a/audiod.c +++ b/audiod.c @@ -1109,7 +1109,7 @@ static void set_initial_status(void) return; } if (strcmp(conf.mode_arg, "on")) - PARA_WARNING_LOG("%s", "invalid mode\n"); + PARA_WARNING_LOG("invalid mode\n"); } /** @@ -1144,7 +1144,7 @@ int main(int argc, char *argv[]) }; if (audiod_cmdline_parser_config_file(config_file, &conf, ¶ms)) { - PARA_EMERG_LOG("%s", "parse error in config file\n"); + PARA_EMERG_LOG("parse error in config file\n"); exit(EXIT_FAILURE); } free(config_file); diff --git a/client_common.c b/client_common.c index fdc9a534..c25e88f8 100644 --- a/client_common.c +++ b/client_common.c @@ -195,7 +195,7 @@ static void client_post_select(struct sched *s, struct task *t) PARA_ERROR_LOG("received the following: %s\n", pcd->buf); return; } - PARA_INFO_LOG("%s", "<-- [challenge]\n"); + PARA_INFO_LOG("<-- [challenge]\n"); /* decrypt challenge number */ t->ret = para_decrypt_challenge(pcd->key_file, &pcd->challenge_nr, (unsigned char *) pcd->buf, 64); @@ -228,7 +228,7 @@ static void client_post_select(struct sched *s, struct task *t) pcd->status = CL_RECEIVED_PROCEED; if (bytes_received < PROCEED_MSG_LEN + 32) return; - PARA_INFO_LOG("%s", "decrypting session key\n"); + PARA_INFO_LOG("decrypting session key\n"); t->ret = para_decrypt_buffer(pcd->key_file, rc4_buf, (unsigned char *)pcd->buf + PROCEED_MSG_LEN + 1, bytes_received - PROCEED_MSG_LEN - 1); diff --git a/command.c b/command.c index 995dc4a0..458faf88 100644 --- a/command.c +++ b/command.c @@ -578,7 +578,7 @@ out: */ static int check_perms(unsigned int perms, struct server_command *cmd_ptr) { - PARA_DEBUG_LOG("%s", "checking permissions\n"); + PARA_DEBUG_LOG("checking permissions\n"); return (cmd_ptr->perms & perms) < cmd_ptr->perms ? -E_PERM : 0; } diff --git a/grab_client.c b/grab_client.c index 926e8fd1..a3db5c68 100644 --- a/grab_client.c +++ b/grab_client.c @@ -271,6 +271,6 @@ err_out: */ void init_grabbing(void) { - PARA_INFO_LOG("%s", "grab init\n"); + PARA_INFO_LOG("grab init\n"); INIT_LIST_HEAD(&inactive_grab_client_list); } diff --git a/gui.c b/gui.c index 933729a2..9a02bdca 100644 --- a/gui.c +++ b/gui.c @@ -858,13 +858,13 @@ static void handle_signal(int sig) } return; case SIGINT: - PARA_WARNING_LOG("%s", "caught SIGINT, reset"); + PARA_WARNING_LOG("caught SIGINT, reset"); /* Nothing to do. SIGINT killed our child, para_client stat. * This get noticed by do_select which resets everything */ return; case SIGUSR1: - PARA_NOTICE_LOG("%s", "got SIGUSR1, rereading configuration"); + PARA_NOTICE_LOG("got SIGUSR1, rereading configuration"); com_reread_conf(); return; case SIGCHLD: @@ -1006,9 +1006,9 @@ static int send_output(void) return ret; } if (do_select(COMMAND_MODE) >= 0) - PARA_INFO_LOG("%s", "command complete"); + PARA_INFO_LOG("command complete"); else - PARA_NOTICE_LOG("%s", "command aborted"); + PARA_NOTICE_LOG("command aborted"); print_in_bar(COLOR_MSG, " "); return 1; } @@ -1202,13 +1202,13 @@ static void com_reread_conf(void) }; if (!cf) { - PARA_WARNING_LOG("%s", "there is no configuration to read"); + PARA_WARNING_LOG("there is no configuration to read"); return; } - PARA_INFO_LOG("%s", "rereading command line options and config file"); + PARA_INFO_LOG("rereading command line options and config file"); gui_cmdline_parser(_argc, _argv, &conf); gui_cmdline_parser_config_file(cf, &conf, ¶ms); - PARA_NOTICE_LOG("%s", "config file reloaded"); + PARA_NOTICE_LOG("config file reloaded"); if (check_key_map_args() < 0) finish(EXIT_FAILURE); } @@ -1253,7 +1253,7 @@ static void com_help(void) static void com_shrink_top_win(void) { if (top.lines <= theme.top_lines_min) { - PARA_WARNING_LOG("%s", "can not decrease top window"); + PARA_WARNING_LOG("can not decrease top window"); return; } init_wins(top.lines - 1); @@ -1265,7 +1265,7 @@ static void com_shrink_top_win(void) static void com_enlarge_top_win(void) { if (bot.lines < 3) { - PARA_WARNING_LOG("%s", "can not increase top window"); + PARA_WARNING_LOG("can not increase top window"); return; } init_wins(top.lines + 1); diff --git a/http_recv.c b/http_recv.c index cb79b643..a3167bd8 100644 --- a/http_recv.c +++ b/http_recv.c @@ -112,7 +112,7 @@ static void http_recv_post_select(struct sched *s, struct task *t) if (!FD_ISSET(phd->fd, &s->wfds)) goto out; rq = make_request_msg(); - PARA_INFO_LOG("%s", "sending http request\n"); + PARA_INFO_LOG("sending http request\n"); t->ret = send_va_buffer(phd->fd, "%s", rq); free(rq); if (t->ret > 0) @@ -125,7 +125,7 @@ static void http_recv_post_select(struct sched *s, struct task *t) t->ret = recv_pattern(phd->fd, HTTP_OK_MSG, MAXLINE); if (t->ret < 0) goto out; - PARA_INFO_LOG("%s", "received ok msg, streaming\n"); + PARA_INFO_LOG("received ok msg, streaming\n"); t->ret = 1; phd->status = HTTP_STREAMING; goto out; diff --git a/http_send.c b/http_send.c index 3de313ce..ccd441a2 100644 --- a/http_send.c +++ b/http_send.c @@ -105,8 +105,7 @@ static void http_post_select(fd_set *rfds, __a_unused fd_set *wfds) phsd->status = HTTP_INVALID_GET_REQUEST; } else { phsd->status = HTTP_GOT_GET_REQUEST; - PARA_INFO_LOG("%s", - "received get request\n"); + PARA_INFO_LOG("received get request\n"); } } break; diff --git a/mp3_afh.c b/mp3_afh.c index 7802e6ac..4093a313 100644 --- a/mp3_afh.c +++ b/mp3_afh.c @@ -273,7 +273,7 @@ static void mp3_get_id3(unsigned char *map, size_t numbytes, off_t *fpos) return; *fpos = numbytes - 128; if (strncmp("TAG", (char *) map + *fpos, 3)) { - PARA_DEBUG_LOG("%s", "no id3 tag\n"); + PARA_DEBUG_LOG("no id3 tag\n"); return; } *fpos = numbytes - 125; diff --git a/net.c b/net.c index 543485e7..60139647 100644 --- a/net.c +++ b/net.c @@ -389,7 +389,7 @@ int send_bin_buffer(int fd, const char *buf, size_t len) crypt_function *cf = NULL; if (!len) - PARA_CRIT_LOG("%s", "len == 0\n"); + PARA_CRIT_LOG("len == 0\n"); if (fd + 1 <= cda_size) cf = crypt_data_array[fd].send; if (cf) { diff --git a/ortp_send.c b/ortp_send.c index 917ebde3..077e7cf5 100644 --- a/ortp_send.c +++ b/ortp_send.c @@ -347,5 +347,5 @@ void ortp_send_init(struct sender *s) ortp_init_target_list(); if (!conf.ortp_no_autostart_given) sender_status = SENDER_ON; - PARA_DEBUG_LOG("%s", "ortp sender init complete\n"); + PARA_DEBUG_LOG("ortp sender init complete\n"); } diff --git a/osx_write.c b/osx_write.c index 366252c4..6001b859 100644 --- a/osx_write.c +++ b/osx_write.c @@ -126,7 +126,7 @@ static OSStatus osx_callback(void * inClientData, dest = outOutputData->mBuffers[i].mData; while (m > 0) { if ((n = powd->from->remaining) <= 0) { - PARA_INFO_LOG("%s", "buffer underrun\n"); + PARA_INFO_LOG("buffer underrun\n"); return 0; } // PARA_INFO_LOG("buf %p: n = %ld, m= %ld\n", powd->from->buffer, n, m); diff --git a/recv.c b/recv.c index 0dca8ead..55e97f1e 100644 --- a/recv.c +++ b/recv.c @@ -81,7 +81,7 @@ int main(int argc, char *argv[]) ret = -E_RECV_SYNTAX; rn.conf = parse_config(argc, argv, &receiver_num); if (!rn.conf) { - PARA_EMERG_LOG("%s", "parse failed\n"); + PARA_EMERG_LOG("parse failed\n"); goto out; } r = &receivers[receiver_num]; diff --git a/recv_common.c b/recv_common.c index ea1bbc93..c8f97c9e 100644 --- a/recv_common.c +++ b/recv_common.c @@ -80,6 +80,6 @@ void *check_receiver_arg(char *ra, int *receiver_num) *receiver_num = j; return parse_receiver_args(j, c? ra + len + 1: NULL); } - PARA_ERROR_LOG("%s", "receiver not found\n"); + PARA_ERROR_LOG("receiver not found\n"); return NULL; } diff --git a/sched.c b/sched.c index 42c5f142..873fb8e3 100644 --- a/sched.c +++ b/sched.c @@ -95,7 +95,7 @@ again: */ static void init_sched(void) { - PARA_INFO_LOG("%s", "initializing scheduler\n"); + PARA_INFO_LOG("initializing scheduler\n"); INIT_LIST_HEAD(&pre_select_list); INIT_LIST_HEAD(&post_select_list); initialized = 1; diff --git a/server.c b/server.c index 98e208ac..4f346e0c 100644 --- a/server.c +++ b/server.c @@ -421,7 +421,7 @@ static unsigned server_init(int argc, char **argv) */ static void handle_sighup(void) { - PARA_NOTICE_LOG("%s", "SIGHUP\n"); + PARA_NOTICE_LOG("SIGHUP\n"); close_log(logfile); /* gets reopened if necessary by parse_config */ logfile = NULL; parse_config(1); /* reopens log */ @@ -554,7 +554,7 @@ genocide: random(); chld_pid = fork(); if (chld_pid < 0) { - PARA_CRIT_LOG("%s", "fork failed\n"); + PARA_CRIT_LOG("fork failed\n"); goto repeat; } if (chld_pid) { diff --git a/write_common.c b/write_common.c index 1ff03761..29a5e532 100644 --- a/write_common.c +++ b/write_common.c @@ -209,7 +209,7 @@ void *check_writer_arg(const char *wa, int *writer_num) *writer_num = i; return writers[i].parse_config(c? wa + len + 1 : ""); } - PARA_ERROR_LOG("%s", "writer not found\n"); + PARA_ERROR_LOG("writer not found\n"); return NULL; }