summaryrefslogtreecommitdiff
path: root/toxcore
diff options
context:
space:
mode:
authorhugbubby <hugbubby@protonmail.com>2018-09-16 08:50:53 -0500
committerhugbubby <hugbubby@protonmail.com>2018-09-16 09:13:03 -0500
commit889e89b3dda722314737c42575c2db4056b3e887 (patch)
tree71cdecf876a304da37e7c8eaea06aeda3e1bd796 /toxcore
parente0f9f2f3a702e2711bc41a930ceffbf94fb77f6d (diff)
Fixed a silly boolean practice using uint8_t
Diffstat (limited to 'toxcore')
-rw-r--r--toxcore/Messenger.c6
-rw-r--r--toxcore/Messenger.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c
index 19bf256b..594fc79a 100644
--- a/toxcore/Messenger.c
+++ b/toxcore/Messenger.c
@@ -2590,8 +2590,8 @@ uint32_t messenger_run_interval(const Messenger *m)
2590void do_messenger(Messenger *m, void *userdata) 2590void do_messenger(Messenger *m, void *userdata)
2591{ 2591{
2592 // Add the TCP relays, but only if this is the first time calling do_messenger 2592 // Add the TCP relays, but only if this is the first time calling do_messenger
2593 if (m->has_added_relays == 0) { 2593 if (!m->has_added_relays) {
2594 m->has_added_relays = 1; 2594 m->has_added_relays = true;
2595 2595
2596 int i; 2596 int i;
2597 2597
@@ -3209,7 +3209,7 @@ static State_Load_Status load_tcp_relays(Messenger *m, const uint8_t *data, uint
3209{ 3209{
3210 if (length != 0) { 3210 if (length != 0) {
3211 unpack_nodes(m->loaded_relays, NUM_SAVED_TCP_RELAYS, nullptr, data, length, 1); 3211 unpack_nodes(m->loaded_relays, NUM_SAVED_TCP_RELAYS, nullptr, data, length, 1);
3212 m->has_added_relays = 0; 3212 m->has_added_relays = false;
3213 } 3213 }
3214 3214
3215 return STATE_LOAD_STATUS_CONTINUE; 3215 return STATE_LOAD_STATUS_CONTINUE;
diff --git a/toxcore/Messenger.h b/toxcore/Messenger.h
index b2de6a5a..ab9d7256 100644
--- a/toxcore/Messenger.h
+++ b/toxcore/Messenger.h
@@ -292,7 +292,7 @@ struct Messenger {
292 292
293 time_t lastdump; 293 time_t lastdump;
294 294
295 uint8_t has_added_relays; // If the first connection has occurred in do_messenger 295 bool has_added_relays; // If the first connection has occurred in do_messenger
296 Node_format loaded_relays[NUM_SAVED_TCP_RELAYS]; // Relays loaded from config 296 Node_format loaded_relays[NUM_SAVED_TCP_RELAYS]; // Relays loaded from config
297 297
298 m_friend_message_cb *friend_message; 298 m_friend_message_cb *friend_message;