aboutsummaryrefslogtreecommitdiff
path: root/miscutils/chat.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-12-21 05:31:47 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2010-12-21 05:31:47 +0100
commit2a1571bfa003233470140a17be4ae4f0239f5a24 (patch)
tree57d2118dfaf31f19a0c5ad0acd8eb89a1c2cbfe7 /miscutils/chat.c
parent5ab20641d687bfe4d86d255f8c369af54b6026e7 (diff)
downloadbusybox-w32-1_18_1.tar.gz
busybox-w32-1_18_1.tar.bz2
busybox-w32-1_18_1.zip
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 '')
-rw-r--r--miscutils/chat.c17
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) {