Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove newlines from the end of LOGGER format strings. #1419

Merged
merged 1 commit into from
Apr 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion toxav/rtp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions toxav/toxav.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion toxcore/DHT.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion toxcore/Messenger.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion toxcore/network.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
8 changes: 4 additions & 4 deletions toxcore/state.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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;
}

Expand All @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion toxcore/tox.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down