Fixed a silly boolean practice using uint8_t

This commit is contained in:
hugbubby 2018-09-16 08:50:53 -05:00
parent e0f9f2f3a7
commit 889e89b3dd
No known key found for this signature in database
GPG Key ID: 3707FF67CAB58387
2 changed files with 4 additions and 4 deletions

View File

@ -2590,8 +2590,8 @@ uint32_t messenger_run_interval(const Messenger *m)
void do_messenger(Messenger *m, void *userdata)
{
// Add the TCP relays, but only if this is the first time calling do_messenger
if (m->has_added_relays == 0) {
m->has_added_relays = 1;
if (!m->has_added_relays) {
m->has_added_relays = true;
int i;
@ -3209,7 +3209,7 @@ static State_Load_Status load_tcp_relays(Messenger *m, const uint8_t *data, uint
{
if (length != 0) {
unpack_nodes(m->loaded_relays, NUM_SAVED_TCP_RELAYS, nullptr, data, length, 1);
m->has_added_relays = 0;
m->has_added_relays = false;
}
return STATE_LOAD_STATUS_CONTINUE;

View File

@ -292,7 +292,7 @@ struct Messenger {
time_t lastdump;
uint8_t has_added_relays; // If the first connection has occurred in do_messenger
bool has_added_relays; // If the first connection has occurred in do_messenger
Node_format loaded_relays[NUM_SAVED_TCP_RELAYS]; // Relays loaded from config
m_friend_message_cb *friend_message;