mirror of
https://github.com/sheumann/hush.git
synced 2025-01-14 12:30:40 +00:00
chat: fix build breakage (variable declared in for())
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
0d6a4ecb30
commit
a3aea32811
@ -175,23 +175,24 @@ int chat_main(int argc UNUSED_PARAM, char **argv)
|
|||||||
llist_add_to_end(&aborts, arg);
|
llist_add_to_end(&aborts, arg);
|
||||||
#if ENABLE_FEATURE_CHAT_CLR_ABORT
|
#if ENABLE_FEATURE_CHAT_CLR_ABORT
|
||||||
} else if (DIR_CLR_ABORT == key) {
|
} else if (DIR_CLR_ABORT == key) {
|
||||||
|
llist_t *l;
|
||||||
// remove the string from abort conditions
|
// remove the string from abort conditions
|
||||||
// N.B. gotta refresh maximum length too...
|
// N.B. gotta refresh maximum length too...
|
||||||
#if ENABLE_FEATURE_CHAT_VAR_ABORT_LEN
|
# if ENABLE_FEATURE_CHAT_VAR_ABORT_LEN
|
||||||
max_abort_len = 0;
|
max_abort_len = 0;
|
||||||
#endif
|
# endif
|
||||||
for (llist_t *l = aborts; l; l = l->link) {
|
for (l = aborts; l; l = l->link) {
|
||||||
#if ENABLE_FEATURE_CHAT_VAR_ABORT_LEN
|
# if ENABLE_FEATURE_CHAT_VAR_ABORT_LEN
|
||||||
size_t len = strlen(l->data);
|
size_t len = strlen(l->data);
|
||||||
#endif
|
# endif
|
||||||
if (!strcmp(arg, l->data)) {
|
if (strcmp(arg, l->data) == 0) {
|
||||||
llist_unlink(&aborts, l);
|
llist_unlink(&aborts, l);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
#if ENABLE_FEATURE_CHAT_VAR_ABORT_LEN
|
# if ENABLE_FEATURE_CHAT_VAR_ABORT_LEN
|
||||||
if (len > max_abort_len)
|
if (len > max_abort_len)
|
||||||
max_abort_len = len;
|
max_abort_len = len;
|
||||||
#endif
|
# endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
} else if (DIR_TIMEOUT == key) {
|
} else if (DIR_TIMEOUT == key) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user