]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
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 65343e5c26fed69375c25b7ae8a2ac26880dc6ab..6fd8eef15a5b3c5f0c07c16795155daa63691ddc 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"))
                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)) {
 
                };
                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);
                        exit(EXIT_FAILURE);
                }
                free(config_file);
index fdc9a5345a8358fc55c9641b7a123c59b22237dd..c25e88f8eda2b7480d9c9a5c4630647f58490847 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_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);
                /* 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;
                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);
                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 995dc4a0b7acb74e2d3a06cada6984a1d8113099..458faf884d4b441313b02ced6e137aaca425e933 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)
 {
  */
 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;
 }
 
        return (cmd_ptr->perms & perms) < cmd_ptr->perms ? -E_PERM : 0;
 }
 
index 926e8fd1aaf75fbf19993be5f1f42b013e583821..a3db5c68895ebf03feecadfeda7c826511f76db3 100644 (file)
@@ -271,6 +271,6 @@ err_out:
  */
 void init_grabbing(void)
 {
  */
 void init_grabbing(void)
 {
-       PARA_INFO_LOG("%s", "grab init\n");
+       PARA_INFO_LOG("grab init\n");
        INIT_LIST_HEAD(&inactive_grab_client_list);
 }
        INIT_LIST_HEAD(&inactive_grab_client_list);
 }
diff --git a/gui.c b/gui.c
index 933729a26c9e530570a8bf01418f6e839fcf535d..9a02bdcabc3c252fb875b893cea5610f23243b2e 100644 (file)
--- a/gui.c
+++ b/gui.c
@@ -858,13 +858,13 @@ static void handle_signal(int sig)
                }
                return;
        case SIGINT:
                }
                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:
                /* 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:
                com_reread_conf();
                return;
        case SIGCHLD:
@@ -1006,9 +1006,9 @@ static int send_output(void)
                return ret;
        }
        if (do_select(COMMAND_MODE) >= 0)
                return ret;
        }
        if (do_select(COMMAND_MODE) >= 0)
-               PARA_INFO_LOG("%s", "command complete");
+               PARA_INFO_LOG("command complete");
        else
        else
-               PARA_NOTICE_LOG("%s", "command aborted");
+               PARA_NOTICE_LOG("command aborted");
        print_in_bar(COLOR_MSG, " ");
        return 1;
 }
        print_in_bar(COLOR_MSG, " ");
        return 1;
 }
@@ -1202,13 +1202,13 @@ static void com_reread_conf(void)
        };
 
        if (!cf) {
        };
 
        if (!cf) {
-               PARA_WARNING_LOG("%s", "there is no configuration to read");
+               PARA_WARNING_LOG("there is no configuration to read");
                return;
        }
                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);
        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);
 }
        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) {
 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);
                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) {
 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);
                return;
        }
        init_wins(top.lines + 1);
index cb79b6436e1669a8725904b75355ef968d7dc23c..a3167bd8626f8bc40361bfb71369079db955d9cc 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();
                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)
                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;
                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;
                t->ret = 1;
                phd->status = HTTP_STREAMING;
                goto out;
index 3de313ce96ca4478ac2c05d186c6788f58eec590..ccd441a2501d2b189a864e3f9f130cdd147bb9bb 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;
                                        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;
                                }
                        }
                        break;
index 7802e6ac913c19966942a07cd8f82f941a8afcc4..4093a31394e26442172f6df0a6d906355c5e6ada 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)) {
                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;
                return;
        }
        *fpos = numbytes - 125;
diff --git a/net.c b/net.c
index 543485e75c084a19ded62eff4f0393c29a157955..601396477c66715e21bc222d69c0d7e0b1aa9f92 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)
        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) {
        if (fd + 1 <= cda_size)
                cf = crypt_data_array[fd].send;
        if (cf) {
index 917ebde382deefaf580a47ee2221442e5c28d9ab..077e7cf5c6c9aa645d6c944b557288141d92a363 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;
        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 366252c4539b1b022d2625c22c1c8bbae211c668..6001b8597d8823f1c7d528439580836088b269cf 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) {
                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);
                                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 0dca8eadd7241588e145135fc3b1b0f205b56b5f..55e97f1e49ed6248ec415598d95762ee9f3f82fa 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) {
        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];
                goto out;
        }
        r = &receivers[receiver_num];
index ea1bbc937a8c7a26bf8e319cd9194b50de693093..c8f97c9e9d61ef914da8559bf7b10ce6fb3e4542 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);
        }
                *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;
 }
        return NULL;
 }
diff --git a/sched.c b/sched.c
index 42c5f14215df5e3f28ff91c11469b5dacf9f2e4a..873fb8e3adca7b1df2d73acd37dbf0764b74e451 100644 (file)
--- a/sched.c
+++ b/sched.c
@@ -95,7 +95,7 @@ again:
  */
 static void init_sched(void)
 {
  */
 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;
        INIT_LIST_HEAD(&pre_select_list);
        INIT_LIST_HEAD(&post_select_list);
        initialized = 1;
index 98e208ac39d9212d67491faf0ad69e21af785128..4f346e0c19d0dba2fad7d59719f3cd7c854a89be 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)
 {
  */
 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 */
        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) {
        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) {
                goto repeat;
        }
        if (chld_pid) {
index 1ff03761e22ec3bd8c9b3cdfaff05ac90a4a01c9..29a5e532698fb9a6e5c2ce9404cd37c1bd98d985 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 : "");
        }
                *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;
 }
 
        return NULL;
 }