diff options
author | Denys Vlasenko | 2010-12-21 05:31:47 +0100 |
---|---|---|
committer | Denys Vlasenko | 2010-12-21 05:31:47 +0100 |
commit | 2a1571bfa003233470140a17be4ae4f0239f5a24 (patch) | |
tree | 57d2118dfaf31f19a0c5ad0acd8eb89a1c2cbfe7 /miscutils | |
parent | 5ab20641d687bfe4d86d255f8c369af54b6026e7 (diff) | |
download | busybox-2a1571bfa003233470140a17be4ae4f0239f5a24.zip busybox-2a1571bfa003233470140a17be4ae4f0239f5a24.tar.gz |
apply post-1.18.0 patches, bump version to 1.18.11_18_1
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'miscutils')
-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 8b151fd..d8370a9 100644 --- a/miscutils/chat.c +++ b/miscutils/chat.c @@ -175,23 +175,24 @@ int chat_main(int argc UNUSED_PARAM, char **argv) llist_add_to_end(&aborts, arg); #if ENABLE_FEATURE_CHAT_CLR_ABORT } else if (DIR_CLR_ABORT == key) { + llist_t *l; // remove the string from abort conditions // 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; -#endif - for (llist_t *l = aborts; l; l = l->link) { -#if ENABLE_FEATURE_CHAT_VAR_ABORT_LEN +# endif + for (l = aborts; l; l = l->link) { +# if ENABLE_FEATURE_CHAT_VAR_ABORT_LEN size_t len = strlen(l->data); -#endif - if (!strcmp(arg, l->data)) { +# endif + if (strcmp(arg, l->data) == 0) { llist_unlink(&aborts, l); continue; } -#if ENABLE_FEATURE_CHAT_VAR_ABORT_LEN +# if ENABLE_FEATURE_CHAT_VAR_ABORT_LEN if (len > max_abort_len) max_abort_len = len; -#endif +# endif } #endif } else if (DIR_TIMEOUT == key) { |