diff options
Diffstat (limited to 'miscutils/chat.c')
-rw-r--r-- | miscutils/chat.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/miscutils/chat.c b/miscutils/chat.c index 8b151fda4..d8370a963 100644 --- a/miscutils/chat.c +++ b/miscutils/chat.c | |||
@@ -175,23 +175,24 @@ int chat_main(int argc UNUSED_PARAM, char **argv) | |||
175 | llist_add_to_end(&aborts, arg); | 175 | llist_add_to_end(&aborts, arg); |
176 | #if ENABLE_FEATURE_CHAT_CLR_ABORT | 176 | #if ENABLE_FEATURE_CHAT_CLR_ABORT |
177 | } else if (DIR_CLR_ABORT == key) { | 177 | } else if (DIR_CLR_ABORT == key) { |
178 | llist_t *l; | ||
178 | // remove the string from abort conditions | 179 | // remove the string from abort conditions |
179 | // N.B. gotta refresh maximum length too... | 180 | // N.B. gotta refresh maximum length too... |
180 | #if ENABLE_FEATURE_CHAT_VAR_ABORT_LEN | 181 | # if ENABLE_FEATURE_CHAT_VAR_ABORT_LEN |
181 | max_abort_len = 0; | 182 | max_abort_len = 0; |
182 | #endif | 183 | # endif |
183 | for (llist_t *l = aborts; l; l = l->link) { | 184 | for (l = aborts; l; l = l->link) { |
184 | #if ENABLE_FEATURE_CHAT_VAR_ABORT_LEN | 185 | # if ENABLE_FEATURE_CHAT_VAR_ABORT_LEN |
185 | size_t len = strlen(l->data); | 186 | size_t len = strlen(l->data); |
186 | #endif | 187 | # endif |
187 | if (!strcmp(arg, l->data)) { | 188 | if (strcmp(arg, l->data) == 0) { |
188 | llist_unlink(&aborts, l); | 189 | llist_unlink(&aborts, l); |
189 | continue; | 190 | continue; |
190 | } | 191 | } |
191 | #if ENABLE_FEATURE_CHAT_VAR_ABORT_LEN | 192 | # if ENABLE_FEATURE_CHAT_VAR_ABORT_LEN |
192 | if (len > max_abort_len) | 193 | if (len > max_abort_len) |
193 | max_abort_len = len; | 194 | max_abort_len = len; |
194 | #endif | 195 | # endif |
195 | } | 196 | } |
196 | #endif | 197 | #endif |
197 | } else if (DIR_TIMEOUT == key) { | 198 | } else if (DIR_TIMEOUT == key) { |