From a618d4f757d57068e388b213290d3a4f6068a9ae Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Sun, 16 Oct 2016 22:21:07 -0700 Subject: [PATCH] Don't use final newline in log calls, it's already appended --- common/os_calls.c | 8 ++++---- sesman/chansrv/clipboard_file.c | 2 +- sesman/chansrv/fifo.c | 8 ++++---- sesman/scp.c | 4 ++-- sesman/tools/sesadmin.c | 8 ++++---- xrdp/xrdp_bitmap.c | 8 ++++---- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/common/os_calls.c b/common/os_calls.c index 9ba6dfc6..c101ad74 100644 --- a/common/os_calls.c +++ b/common/os_calls.c @@ -439,7 +439,7 @@ g_tcp_socket(void) if (setsockopt(rv, IPPROTO_IPV6, IPV6_V6ONLY, (char*)&option_value, option_len) < 0) { - log_message(LOG_LEVEL_ERROR, "g_tcp_socket: setsockopt() failed\n"); + log_message(LOG_LEVEL_ERROR, "g_tcp_socket: setsockopt() failed"); } } } @@ -455,7 +455,7 @@ g_tcp_socket(void) if (setsockopt(rv, SOL_SOCKET, SO_REUSEADDR, (char *)&option_value, option_len) < 0) { - log_message(LOG_LEVEL_ERROR, "g_tcp_socket: setsockopt() failed\n"); + log_message(LOG_LEVEL_ERROR, "g_tcp_socket: setsockopt() failed"); } } } @@ -472,7 +472,7 @@ g_tcp_socket(void) if (setsockopt(rv, SOL_SOCKET, SO_SNDBUF, (char *)&option_value, option_len) < 0) { - log_message(LOG_LEVEL_ERROR, "g_tcp_socket: setsockopt() failed\n"); + log_message(LOG_LEVEL_ERROR, "g_tcp_socket: setsockopt() failed"); } } } @@ -846,7 +846,7 @@ g_sck_set_non_blocking(int sck) i = i | O_NONBLOCK; if (fcntl(sck, F_SETFL, i) < 0) { - log_message(LOG_LEVEL_ERROR, "g_sck_set_non_blocking: fcntl() failed\n"); + log_message(LOG_LEVEL_ERROR, "g_sck_set_non_blocking: fcntl() failed"); } #endif return 0; diff --git a/sesman/chansrv/clipboard_file.c b/sesman/chansrv/clipboard_file.c index 194a2cf4..5724829f 100644 --- a/sesman/chansrv/clipboard_file.c +++ b/sesman/chansrv/clipboard_file.c @@ -453,7 +453,7 @@ clipboard_send_file_data(int streamId, int lindex, if (g_file_seek(fd, nPositionLow) < 0) { log_message(LOG_LEVEL_ERROR, "clipboard_send_file_data: seek error " - "in file: %s\n", full_fn); + "in file: %s", full_fn); g_file_close(fd); return 1; } diff --git a/sesman/chansrv/fifo.c b/sesman/chansrv/fifo.c index b212736a..595dbb29 100644 --- a/sesman/chansrv/fifo.c +++ b/sesman/chansrv/fifo.c @@ -235,21 +235,21 @@ fifo_remove(FIFO* fp) void* fifo_peek(FIFO* fp) { - log_debug_high("entered\n"); + log_debug_high("entered"); if (!fp) { - log_debug_high("FIFO is null\n"); + log_debug_high("FIFO is null"); return 0; } if (fp->rd_ptr == fp->wr_ptr) { - log_debug_high("FIFO is empty\n"); + log_debug_high("FIFO is empty"); return 0; } - log_debug_low("peeking data at index %d\n", fp->rd_ptr); + log_debug_low("peeking data at index %d", fp->rd_ptr); return (void *) fp->user_data[fp->rd_ptr]; } diff --git a/sesman/scp.c b/sesman/scp.c index 6d7ea203..e4abe004 100644 --- a/sesman/scp.c +++ b/sesman/scp.c @@ -54,12 +54,12 @@ scp_process_start(void *sck) if (sdata->version == 0) { /* starts processing an scp v0 connection */ - LOG_DBG("accept ok, go on with scp v0\n", 0); + LOG_DBG("accept ok, go on with scp v0", 0); scp_v0_process(&scon, sdata); } else { - LOG_DBG("accept ok, go on with scp v1\n", 0); + LOG_DBG("accept ok, go on with scp v1", 0); /*LOG_DBG("user: %s\npass: %s",sdata->username, sdata->password);*/ scp_v1_process(&scon, sdata); } diff --git a/sesman/tools/sesadmin.c b/sesman/tools/sesadmin.c index 98f727e6..648598da 100644 --- a/sesman/tools/sesadmin.c +++ b/sesman/tools/sesadmin.c @@ -129,18 +129,18 @@ int main(int argc, char **argv) sock = g_tcp_socket(); if (sock < 0) { - LOG_DBG("Socket open error, g_tcp_socket() failed\n"); + LOG_DBG("Socket open error, g_tcp_socket() failed"); return 1; } s = scp_session_create(); c = scp_connection_create(sock); - LOG_DBG("Connecting to %s:%s with user %s (%s)\n", serv, port, user, pass); + LOG_DBG("Connecting to %s:%s with user %s (%s)", serv, port, user, pass); if (0 != g_tcp_connect(sock, serv, port)) { - LOG_DBG("g_tcp_connect() error\n"); + LOG_DBG("g_tcp_connect() error"); return 1; } @@ -153,7 +153,7 @@ int main(int argc, char **argv) if (SCP_CLIENT_STATE_OK != e) { - LOG_DBG("libscp error connecting: %s %d\n", s->errstr, (int)e); + LOG_DBG("libscp error connecting: %s %d", s->errstr, (int)e); } if (0 == g_strncmp(cmnd, "list", 5)) diff --git a/xrdp/xrdp_bitmap.c b/xrdp/xrdp_bitmap.c index e99e2bfe..9ffc6284 100644 --- a/xrdp/xrdp_bitmap.c +++ b/xrdp/xrdp_bitmap.c @@ -471,7 +471,7 @@ xrdp_bitmap_load(struct xrdp_bitmap *self, const char *filename, int *palette) /* read bmp header */ if (g_file_seek(fd, 14) < 0) { - log_message(LOG_LEVEL_ERROR, "xrdp_bitmap_load: seek error in file %s\n", + log_message(LOG_LEVEL_ERROR, "xrdp_bitmap_load: seek error in file %s", filename); free_stream(s); g_file_close(fd); @@ -505,7 +505,7 @@ xrdp_bitmap_load(struct xrdp_bitmap *self, const char *filename, int *palette) { if (g_file_seek(fd, 14 + header.size) < 0) { - log_message(LOG_LEVEL_ERROR, "xrdp_bitmap_load: seek error in file %s\n", + log_message(LOG_LEVEL_ERROR, "xrdp_bitmap_load: seek error in file %s", filename); } xrdp_bitmap_resize(self, header.image_width, header.image_height); @@ -562,7 +562,7 @@ xrdp_bitmap_load(struct xrdp_bitmap *self, const char *filename, int *palette) /* read palette */ if (g_file_seek(fd, 14 + header.size) < 0) { - log_message(LOG_LEVEL_ERROR, "xrdp_bitmap_load: seek error in file %s\n", + log_message(LOG_LEVEL_ERROR, "xrdp_bitmap_load: seek error in file %s", filename); } init_stream(s, 8192); @@ -623,7 +623,7 @@ xrdp_bitmap_load(struct xrdp_bitmap *self, const char *filename, int *palette) /* read palette */ if (g_file_seek(fd, 14 + header.size) < 0) { - log_message(LOG_LEVEL_ERROR, "xrdp_bitmap_load: seek error in file %s\n", + log_message(LOG_LEVEL_ERROR, "xrdp_bitmap_load: seek error in file %s", filename); } init_stream(s, 8192);