Skip to content

Commit f1c27fa

Browse files
committed
Opps, need to return a bool.
1 parent 34232d3 commit f1c27fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/storage.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,9 +280,9 @@ bool homekit_storage_can_add_pairing() {
280280
for (int i = 0; i < MAX_PAIRINGS; i++) {
281281
spiflash_read(PAIRINGS_ADDR + (sizeof(data) * i), (uint32_t *) &data, sizeof(data));
282282
if (memcmp(data.magic, hap_magic, sizeof(hap_magic)) || !data.active)
283-
return i;
283+
return true;
284284
}
285-
return -1;
285+
return false;
286286
}
287287

288288
static int compact_data() {

0 commit comments

Comments
 (0)