Kill superfluous "%s" in log messages.
authorAndre Noll <maan@systemlinux.org>
Sun, 17 Feb 2008 21:12:39 +0000 (22:12 +0100)
committerAndre Noll <maan@systemlinux.org>
Sun, 17 Feb 2008 21:12:39 +0000 (22:12 +0100)
16 files changed:
audiod.c
client_common.c
command.c
grab_client.c
gui.c
http_recv.c
http_send.c
mp3_afh.c
net.c
ortp_send.c
osx_write.c
recv.c
recv_common.c
sched.c
server.c
write_common.c

index 65343e5..6fd8eef 100644 (file)
--- 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, &params)) {
-                       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);
index fdc9a53..c25e88f 100644 (file)
@@ -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);
index 995dc4a..458faf8 100644 (file)
--- 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;
 }
 
index 926e8fd..a3db5c6 100644 (file)
@@ -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 933729a..9a02bdc 100644 (file)
--- 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, &params);
-       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);
index cb79b64..a3167bd 100644 (file)
@@ -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;
index 3de313c..ccd441a 100644 (file)
@@ -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;
index 7802e6a..4093a31 100644 (file)
--- 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 543485e..6013964 100644 (file)
--- 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) {
index 917ebde..077e7cf 100644 (file)
@@ -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");
 }
index 366252c..6001b85 100644 (file)
@@ -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 0dca8ea..55e97f1 100644 (file)
--- 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];
index ea1bbc9..c8f97c9 100644 (file)
@@ -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 42c5f14..873fb8e 100644 (file)
--- 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;
index 98e208a..4f346e0 100644 (file)
--- 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) {
index 1ff0376..29a5e53 100644 (file)
@@ -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;
 }