summaryrefslogtreecommitdiff
path: root/networking/ifupdown.c
diff options
context:
space:
mode:
authorDenis Vlasenko2006-12-19 23:36:04 +0000
committerDenis Vlasenko2006-12-19 23:36:04 +0000
commitb95636c52fbb058a39548bcbc4e86456ebbd7b7b (patch)
tree0f82f8e3d225f3bcefdbf7070ae0716f1b309630 /networking/ifupdown.c
parent2375d75f3267e6e4370f221fea485eac8e73d402 (diff)
downloadbusybox-b95636c52fbb058a39548bcbc4e86456ebbd7b7b.zip
busybox-b95636c52fbb058a39548bcbc4e86456ebbd7b7b.tar.gz
remove casts from xmalloc()
Diffstat (limited to 'networking/ifupdown.c')
-rw-r--r--networking/ifupdown.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/networking/ifupdown.c b/networking/ifupdown.c
index b53d233..adbc37e 100644
--- a/networking/ifupdown.c
+++ b/networking/ifupdown.c
@@ -1048,7 +1048,7 @@ static char *run_mapping(char *physical, struct mapping_defn_t * map)
/* If the mapping script exited successfully, try to
* grab a line of output and use that as the name of the
* logical interface. */
- char *new_logical = (char *)xmalloc(MAX_INTERFACE_LENGTH);
+ char *new_logical = xmalloc(MAX_INTERFACE_LENGTH);
if (fgets(new_logical, MAX_INTERFACE_LENGTH, out)) {
/* If we are able to read a line of output from the script,
@@ -1139,7 +1139,6 @@ int ifupdown_main(int argc, char **argv)
llist_add_to_end(&target_list, argv[optind]);
}
-
/* Update the interfaces */
while (target_list) {
llist_t *iface_list;
@@ -1255,8 +1254,7 @@ int ifupdown_main(int argc, char **argv)
state_fp = xfopen("/var/run/ifstate", "w");
while (state_list) {
if (state_list->data) {
- fputs(state_list->data, state_fp);
- fputc('\n', state_fp);
+ fprintf(state_fp, "%s\n", state_list->data);
}
state_list = state_list->link;
}