summaryrefslogtreecommitdiff
path: root/toxcore/Messenger.c
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2018-02-24 20:32:38 +0000
committeriphydf <iphydf@users.noreply.github.com>2018-02-24 20:35:57 +0000
commitafc80922e720f5d2a93bdfb3745da058e5ddf81b (patch)
tree69c00a0d1d6e6217e443dfc8e344af78e6cc8dd0 /toxcore/Messenger.c
parent25debce85074f6f0883905fa496829125ddad713 (diff)
Some minor cleanups suggested by cppcheck.
DETECTED=cppcheck
Diffstat (limited to 'toxcore/Messenger.c')
-rw-r--r--toxcore/Messenger.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c
index 935cb64c..5542ee1b 100644
--- a/toxcore/Messenger.c
+++ b/toxcore/Messenger.c
@@ -2768,10 +2768,10 @@ struct SAVED_FRIEND {
2768static uint32_t friend_size() 2768static uint32_t friend_size()
2769{ 2769{
2770 uint32_t data = 0; 2770 uint32_t data = 0;
2771 const struct SAVED_FRIEND temp = { 0 }; 2771 const struct SAVED_FRIEND *const temp = nullptr;
2772 2772
2773#define VALUE_MEMBER(NAME) data += sizeof(temp.NAME) 2773#define VALUE_MEMBER(NAME) data += sizeof(temp->NAME)
2774#define ARRAY_MEMBER(NAME) data += sizeof(temp.NAME) 2774#define ARRAY_MEMBER(NAME) data += sizeof(temp->NAME)
2775 2775
2776 // Exactly the same in friend_load, friend_save, and friend_size 2776 // Exactly the same in friend_load, friend_save, and friend_size
2777 VALUE_MEMBER(status); 2777 VALUE_MEMBER(status);