Skip to content

Commit f7cfba0

Browse files
committed
fix broken build under c89 compiler
1 parent 958535c commit f7cfba0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/tp_allowed_methods.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ void
9999
tp_allowed_methods_free(tp_allowed_methods_t *tam)
100100
{
101101
assert(tam);
102-
for (struct link__ *it = tam->head; it; it = it->next)
102+
struct link__ *it = tam->head;
103+
for (; it; it = it->next)
103104
free_link(it);
104105
tam->head = tam->tail = NULL;
105106
}
@@ -113,7 +114,8 @@ tp_allowed_methods_is_allow(const tp_allowed_methods_t *tam,
113114
assert(tam);
114115
if (!tam->head /* - OFF */)
115116
return true;
116-
for (struct link__ *it = tam->head; it; it = it->next) {
117+
struct link__ *it = tam->head;
118+
for (; it; it = it->next) {
117119
if (it->name && it->len == len &&
118120
strcmp((const char *)it->name, (const char *)name) == 0)
119121
return true;

0 commit comments

Comments
 (0)