[PATCH] compile option: fix -std=c99,gnu99 errors in mingw
Macpaul Lin
macpaul at andestech.com
Fri Dec 17 03:43:27 UTC 2010
Fix variable declaration in for loop.
Update files:
miscutils/chat.c
Variable declaration in for loop will cause compile error
when build busybox in MinGW environment.
Signed-off-by: Macpaul Lin <macpaul at andestech.com>
---
miscutils/chat.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/miscutils/chat.c b/miscutils/chat.c
index 3ffd7b2..f850f92 100644
--- a/miscutils/chat.c
+++ b/miscutils/chat.c
@@ -180,7 +180,8 @@ int chat_main(int argc UNUSED_PARAM, char **argv)
#if ENABLE_FEATURE_CHAT_VAR_ABORT_LEN
max_abort_len = 0;
#endif
- for (llist_t *l = aborts; l; l = l->link) {
+ llist_t *l = NULL;
+ for (l = aborts; l; l = l->link) {
#if ENABLE_FEATURE_CHAT_VAR_ABORT_LEN
size_t len = strlen(l->data);
#endif
--
1.6.4.1
More information about the busybox
mailing list