mirror of
https://github.com/TokTok/c-toxcore
synced 2026-10-23 08:42:21 +00:00
Remove newlines from the end of LOGGER format strings.
See https://github.com/TokTok/hs-tokstyle/pull/49 for the corresponding tokstyle analysis.
This commit is contained in:
7 files changed
+11
-11
No files matched your search
+1
-1
@@ -256,7 +256,7 @@ static bool fill_data_into_slot(const Logger *log, struct RTPWorkBufferList *wkb
|
||||
struct RTPMessage *msg = (struct RTPMessage *)calloc(1, sizeof(struct RTPMessage) + header->data_length_full);
|
||||
|
||||
if (msg == nullptr) {
|
||||
LOGGER_ERROR(log, "Out of memory while trying to allocate for frame of size %u\n",
|
||||
LOGGER_ERROR(log, "Out of memory while trying to allocate for frame of size %u",
|
||||
(unsigned)header->data_length_full);
|
||||
// Out of memory: throw away the incoming data.
|
||||
return false;
|
||||
|
||||
+2
-2
@@ -918,7 +918,7 @@ bool toxav_video_send_frame(ToxAV *av, uint32_t friend_number, uint16_t width, u
|
||||
|
||||
if (vrc != VPX_CODEC_OK) {
|
||||
pthread_mutex_unlock(call->mutex_video);
|
||||
LOGGER_ERROR(av->m->log, "Could not encode video frame: %s\n", vpx_codec_err_to_string(vrc));
|
||||
LOGGER_ERROR(av->m->log, "Could not encode video frame: %s", vpx_codec_err_to_string(vrc));
|
||||
rc = TOXAV_ERR_SEND_FRAME_INVALID;
|
||||
goto RETURN;
|
||||
}
|
||||
@@ -1308,7 +1308,7 @@ static bool call_prepare_transmission(ToxAVCall *call)
|
||||
}
|
||||
|
||||
if (call->active) {
|
||||
LOGGER_WARNING(av->m->log, "Call already active!\n");
|
||||
LOGGER_WARNING(av->m->log, "Call already active!");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -2924,7 +2924,7 @@ static State_Load_Status dht_load_state_callback(void *outer, const uint8_t *dat
|
||||
}
|
||||
|
||||
default:
|
||||
LOGGER_ERROR(dht->log, "Load state (DHT): contains unrecognized part (len %u, type %u)\n",
|
||||
LOGGER_ERROR(dht->log, "Load state (DHT): contains unrecognized part (len %u, type %u)",
|
||||
length, type);
|
||||
break;
|
||||
}
|
||||
|
||||
+1
-1
@@ -2651,7 +2651,7 @@ void do_messenger(Messenger *m, void *userdata)
|
||||
}
|
||||
|
||||
if (m->numfriends != dht_get_num_friends(m->dht)) {
|
||||
LOGGER_TRACE(m->log, "Friend num in DHT %u != friend num in msger %u\n", dht_get_num_friends(m->dht), m->numfriends);
|
||||
LOGGER_TRACE(m->log, "Friend num in DHT %u != friend num in msger %u", dht_get_num_friends(m->dht), m->numfriends);
|
||||
}
|
||||
|
||||
Friend *msgfptr;
|
||||
|
||||
+1
-1
@@ -759,7 +759,7 @@ Networking_Core *new_networking_ex(const Logger *log, IP ip, uint16_t port_from,
|
||||
|
||||
/* maybe check for invalid IPs like 224+.x.y.z? if there is any IP set ever */
|
||||
if (!net_family_is_ipv4(ip.family) && !net_family_is_ipv6(ip.family)) {
|
||||
LOGGER_ERROR(log, "invalid address family: %u\n", ip.family.value);
|
||||
LOGGER_ERROR(log, "invalid address family: %u", ip.family.value);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -11,7 +11,7 @@ int state_load(const Logger *log, state_load_cb *state_load_callback, void *oute
|
||||
const uint8_t *data, uint32_t length, uint16_t cookie_inner)
|
||||
{
|
||||
if (state_load_callback == nullptr || data == nullptr) {
|
||||
LOGGER_ERROR(log, "state_load() called with invalid args.\n");
|
||||
LOGGER_ERROR(log, "state_load() called with invalid args.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -30,13 +30,13 @@ int state_load(const Logger *log, state_load_cb *state_load_callback, void *oute
|
||||
|
||||
if (length < length_sub) {
|
||||
/* file truncated */
|
||||
LOGGER_ERROR(log, "state file too short: %u < %u\n", length, length_sub);
|
||||
LOGGER_ERROR(log, "state file too short: %u < %u", length, length_sub);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (lendian_to_host16((cookie_type >> 16)) != cookie_inner) {
|
||||
/* something is not matching up in a bad way, give up */
|
||||
LOGGER_ERROR(log, "state file garbled: %04x != %04x\n", cookie_type >> 16, cookie_inner);
|
||||
LOGGER_ERROR(log, "state file garbled: %04x != %04x", cookie_type >> 16, cookie_inner);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ int state_load(const Logger *log, state_load_cb *state_load_callback, void *oute
|
||||
}
|
||||
|
||||
if (length != 0) {
|
||||
LOGGER_ERROR(log, "unparsed data in state file of length %u\n", length);
|
||||
LOGGER_ERROR(log, "unparsed data in state file of length %u", length);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -350,7 +350,7 @@ static State_Load_Status state_load_callback(void *outer, const uint8_t *data, u
|
||||
return STATE_LOAD_STATUS_END;
|
||||
}
|
||||
|
||||
LOGGER_ERROR(tox->m->log, "Load state: contains unrecognized part (len %u, type %u)\n",
|
||||
LOGGER_ERROR(tox->m->log, "Load state: contains unrecognized part (len %u, type %u)",
|
||||
length, type);
|
||||
|
||||
return STATE_LOAD_STATUS_CONTINUE;
|
||||
|
||||
Reference in new issue
Block a user