Skip to content

Commit d2a9b54

Browse files
committed
Fix empty for loop body
This was actually a real bug - found via travis. conf.c:878:66: error: for loop has empty body [-Werror,-Wempty-body]
1 parent 0540723 commit d2a9b54

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/conf.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -863,13 +863,13 @@ void parse_trusted_mac_list(const char *ptr) {
863863
config.trustedmaclist->next = NULL;
864864
} else {
865865
/* Advance to the last entry */
866-
for (p = config.trustedmaclist; p->next != NULL; p = p->next);
867-
p->next = safe_malloc(sizeof(t_trusted_mac));
868-
p = p->next;
869-
p->mac = safe_strdup(mac);
870-
p->next = NULL;
866+
for (p = config.trustedmaclist; p->next != NULL; p = p->next) {
867+
p->next = safe_malloc(sizeof(t_trusted_mac));
868+
p = p->next;
869+
p->mac = safe_strdup(mac);
870+
p->next = NULL;
871+
}
871872
}
872-
}
873873
}
874874
}
875875

0 commit comments

Comments
 (0)