summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2020-04-07 19:17:58 +0000
committeriphydf <iphydf@users.noreply.github.com>2020-04-07 19:17:58 +0000
commit8ddc2df662afff8a547371c93d5b5655f8f3de2f (patch)
tree75035b2a431c53520fee02dba9842575de8a7a4c
parentdfe19e04d3fd47aaf8035451491ff97155fc8cb4 (diff)
Remove newlines from the end of LOGGER format strings.
See https://github.com/TokTok/hs-tokstyle/pull/49 for the corresponding tokstyle analysis.
-rw-r--r--toxav/rtp.c2
-rw-r--r--toxav/toxav.c4
-rw-r--r--toxcore/DHT.c2
-rw-r--r--toxcore/Messenger.c2
-rw-r--r--toxcore/network.c2
-rw-r--r--toxcore/state.c8
-rw-r--r--toxcore/tox.c2
7 files changed, 11 insertions, 11 deletions
diff --git a/toxav/rtp.c b/toxav/rtp.c
index aed9523b..f48c483b 100644
--- a/toxav/rtp.c
+++ b/toxav/rtp.c
@@ -256,7 +256,7 @@ static bool fill_data_into_slot(const Logger *log, struct RTPWorkBufferList *wkb
256 struct RTPMessage *msg = (struct RTPMessage *)calloc(1, sizeof(struct RTPMessage) + header->data_length_full); 256 struct RTPMessage *msg = (struct RTPMessage *)calloc(1, sizeof(struct RTPMessage) + header->data_length_full);
257 257
258 if (msg == nullptr) { 258 if (msg == nullptr) {
259 LOGGER_ERROR(log, "Out of memory while trying to allocate for frame of size %u\n", 259 LOGGER_ERROR(log, "Out of memory while trying to allocate for frame of size %u",
260 (unsigned)header->data_length_full); 260 (unsigned)header->data_length_full);
261 // Out of memory: throw away the incoming data. 261 // Out of memory: throw away the incoming data.
262 return false; 262 return false;
diff --git a/toxav/toxav.c b/toxav/toxav.c
index 8f3c7e01..dda16ecd 100644
--- a/toxav/toxav.c
+++ b/toxav/toxav.c
@@ -918,7 +918,7 @@ bool toxav_video_send_frame(ToxAV *av, uint32_t friend_number, uint16_t width, u
918 918
919 if (vrc != VPX_CODEC_OK) { 919 if (vrc != VPX_CODEC_OK) {
920 pthread_mutex_unlock(call->mutex_video); 920 pthread_mutex_unlock(call->mutex_video);
921 LOGGER_ERROR(av->m->log, "Could not encode video frame: %s\n", vpx_codec_err_to_string(vrc)); 921 LOGGER_ERROR(av->m->log, "Could not encode video frame: %s", vpx_codec_err_to_string(vrc));
922 rc = TOXAV_ERR_SEND_FRAME_INVALID; 922 rc = TOXAV_ERR_SEND_FRAME_INVALID;
923 goto RETURN; 923 goto RETURN;
924 } 924 }
@@ -1308,7 +1308,7 @@ static bool call_prepare_transmission(ToxAVCall *call)
1308 } 1308 }
1309 1309
1310 if (call->active) { 1310 if (call->active) {
1311 LOGGER_WARNING(av->m->log, "Call already active!\n"); 1311 LOGGER_WARNING(av->m->log, "Call already active!");
1312 return true; 1312 return true;
1313 } 1313 }
1314 1314
diff --git a/toxcore/DHT.c b/toxcore/DHT.c
index 191ebc0e..7525e695 100644
--- a/toxcore/DHT.c
+++ b/toxcore/DHT.c
@@ -2924,7 +2924,7 @@ static State_Load_Status dht_load_state_callback(void *outer, const uint8_t *dat
2924 } 2924 }
2925 2925
2926 default: 2926 default:
2927 LOGGER_ERROR(dht->log, "Load state (DHT): contains unrecognized part (len %u, type %u)\n", 2927 LOGGER_ERROR(dht->log, "Load state (DHT): contains unrecognized part (len %u, type %u)",
2928 length, type); 2928 length, type);
2929 break; 2929 break;
2930 } 2930 }
diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c
index ddd04518..a4bc8100 100644
--- a/toxcore/Messenger.c
+++ b/toxcore/Messenger.c
@@ -2651,7 +2651,7 @@ void do_messenger(Messenger *m, void *userdata)
2651 } 2651 }
2652 2652
2653 if (m->numfriends != dht_get_num_friends(m->dht)) { 2653 if (m->numfriends != dht_get_num_friends(m->dht)) {
2654 LOGGER_TRACE(m->log, "Friend num in DHT %u != friend num in msger %u\n", dht_get_num_friends(m->dht), m->numfriends); 2654 LOGGER_TRACE(m->log, "Friend num in DHT %u != friend num in msger %u", dht_get_num_friends(m->dht), m->numfriends);
2655 } 2655 }
2656 2656
2657 Friend *msgfptr; 2657 Friend *msgfptr;
diff --git a/toxcore/network.c b/toxcore/network.c
index d3284c4d..3f297ad7 100644
--- a/toxcore/network.c
+++ b/toxcore/network.c
@@ -759,7 +759,7 @@ Networking_Core *new_networking_ex(const Logger *log, IP ip, uint16_t port_from,
759 759
760 /* maybe check for invalid IPs like 224+.x.y.z? if there is any IP set ever */ 760 /* maybe check for invalid IPs like 224+.x.y.z? if there is any IP set ever */
761 if (!net_family_is_ipv4(ip.family) && !net_family_is_ipv6(ip.family)) { 761 if (!net_family_is_ipv4(ip.family) && !net_family_is_ipv6(ip.family)) {
762 LOGGER_ERROR(log, "invalid address family: %u\n", ip.family.value); 762 LOGGER_ERROR(log, "invalid address family: %u", ip.family.value);
763 return nullptr; 763 return nullptr;
764 } 764 }
765 765
diff --git a/toxcore/state.c b/toxcore/state.c
index 67cc68ad..13ae8e71 100644
--- a/toxcore/state.c
+++ b/toxcore/state.c
@@ -11,7 +11,7 @@ int state_load(const Logger *log, state_load_cb *state_load_callback, void *oute
11 const uint8_t *data, uint32_t length, uint16_t cookie_inner) 11 const uint8_t *data, uint32_t length, uint16_t cookie_inner)
12{ 12{
13 if (state_load_callback == nullptr || data == nullptr) { 13 if (state_load_callback == nullptr || data == nullptr) {
14 LOGGER_ERROR(log, "state_load() called with invalid args.\n"); 14 LOGGER_ERROR(log, "state_load() called with invalid args.");
15 return -1; 15 return -1;
16 } 16 }
17 17
@@ -30,13 +30,13 @@ int state_load(const Logger *log, state_load_cb *state_load_callback, void *oute
30 30
31 if (length < length_sub) { 31 if (length < length_sub) {
32 /* file truncated */ 32 /* file truncated */
33 LOGGER_ERROR(log, "state file too short: %u < %u\n", length, length_sub); 33 LOGGER_ERROR(log, "state file too short: %u < %u", length, length_sub);
34 return -1; 34 return -1;
35 } 35 }
36 36
37 if (lendian_to_host16((cookie_type >> 16)) != cookie_inner) { 37 if (lendian_to_host16((cookie_type >> 16)) != cookie_inner) {
38 /* something is not matching up in a bad way, give up */ 38 /* something is not matching up in a bad way, give up */
39 LOGGER_ERROR(log, "state file garbled: %04x != %04x\n", cookie_type >> 16, cookie_inner); 39 LOGGER_ERROR(log, "state file garbled: %04x != %04x", cookie_type >> 16, cookie_inner);
40 return -1; 40 return -1;
41 } 41 }
42 42
@@ -58,7 +58,7 @@ int state_load(const Logger *log, state_load_cb *state_load_callback, void *oute
58 } 58 }
59 59
60 if (length != 0) { 60 if (length != 0) {
61 LOGGER_ERROR(log, "unparsed data in state file of length %u\n", length); 61 LOGGER_ERROR(log, "unparsed data in state file of length %u", length);
62 return -1; 62 return -1;
63 } 63 }
64 64
diff --git a/toxcore/tox.c b/toxcore/tox.c
index b70be7a3..fdf2b42c 100644
--- a/toxcore/tox.c
+++ b/toxcore/tox.c
@@ -350,7 +350,7 @@ static State_Load_Status state_load_callback(void *outer, const uint8_t *data, u
350 return STATE_LOAD_STATUS_END; 350 return STATE_LOAD_STATUS_END;
351 } 351 }
352 352
353 LOGGER_ERROR(tox->m->log, "Load state: contains unrecognized part (len %u, type %u)\n", 353 LOGGER_ERROR(tox->m->log, "Load state: contains unrecognized part (len %u, type %u)",
354 length, type); 354 length, type);
355 355
356 return STATE_LOAD_STATUS_CONTINUE; 356 return STATE_LOAD_STATUS_CONTINUE;