mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Fixed a silly boolean practice using uint8_t
This commit is contained in:
parent
e0f9f2f3a7
commit
889e89b3dd
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user