summaryrefslogtreecommitdiff
path: root/toxcore/state.c
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 /toxcore/state.c
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.
Diffstat (limited to 'toxcore/state.c')
-rw-r--r--toxcore/state.c8
1 files changed, 4 insertions, 4 deletions
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