summaryrefslogtreecommitdiff
path: root/toxcore
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore')
-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
5 files changed, 8 insertions, 8 deletions
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;