summaryrefslogtreecommitdiff
path: root/toxcore/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore/util.c')
-rw-r--r--toxcore/util.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/toxcore/util.c b/toxcore/util.c
index e19808a2..b7a8fda6 100644
--- a/toxcore/util.c
+++ b/toxcore/util.c
@@ -130,7 +130,6 @@ int load_state(load_state_callback_func load_state_callback, Logger *log, void *
130 } 130 }
131 131
132 132
133 uint16_t type;
134 uint32_t length_sub, cookie_type; 133 uint32_t length_sub, cookie_type;
135 uint32_t size_head = sizeof(uint32_t) * 2; 134 uint32_t size_head = sizeof(uint32_t) * 2;
136 135
@@ -152,9 +151,8 @@ int load_state(load_state_callback_func load_state_callback, Logger *log, void *
152 return -1; 151 return -1;
153 } 152 }
154 153
155 type = lendian_to_host16(cookie_type & 0xFFFF); 154 const uint16_t type = lendian_to_host16(cookie_type & 0xFFFF);
156 155 const int ret = load_state_callback(outer, data, length_sub, type);
157 int ret = load_state_callback(outer, data, length_sub, type);
158 156
159 if (ret == -1) { 157 if (ret == -1) {
160 return -1; 158 return -1;