aboutsummaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorGlenn L McGrath <bug1@ihug.co.nz>2002-12-06 08:10:40 +0000
committerGlenn L McGrath <bug1@ihug.co.nz>2002-12-06 08:10:40 +0000
commit9227371b71dfdc9ad52cb952cecd04ddbde83981 (patch)
treedfcd60e0c4dad47e30db9f85d74f51e48d946cab /networking
parent83fdb317a7ceeb4b38099477dc98bd0e7437b1b0 (diff)
downloadbusybox-9227371b71dfdc9ad52cb952cecd04ddbde83981.tar.gz
Fix bug that stoped -a working
Diffstat (limited to 'networking')
-rw-r--r--networking/ifupdown.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/networking/ifupdown.c b/networking/ifupdown.c
index 1387033ba..450a50896 100644
--- a/networking/ifupdown.c
+++ b/networking/ifupdown.c
@@ -1405,12 +1405,14 @@ extern int ifupdown_main(int argc, char **argv)
}
}
if (state_fp != NULL && !no_act) {
+ unsigned short j;
+
if (ftruncate(fileno(state_fp), 0) < 0) {
error_msg_and_die("failed to truncate statefile %s: %s", statefile, strerror(errno));
}
rewind(state_fp);
- for (i = 0; i < n_state; i++) {
+ for (j = 0; j < n_state; j++) {
fputs(state[i], state_fp);
fputc('\n', state_fp);
}