diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-12-19 23:36:04 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-12-19 23:36:04 +0000 |
commit | b95636c52fbb058a39548bcbc4e86456ebbd7b7b (patch) | |
tree | 0f82f8e3d225f3bcefdbf7070ae0716f1b309630 /networking | |
parent | 2375d75f3267e6e4370f221fea485eac8e73d402 (diff) | |
download | busybox-w32-b95636c52fbb058a39548bcbc4e86456ebbd7b7b.tar.gz busybox-w32-b95636c52fbb058a39548bcbc4e86456ebbd7b7b.tar.bz2 busybox-w32-b95636c52fbb058a39548bcbc4e86456ebbd7b7b.zip |
remove casts from xmalloc()
Diffstat (limited to 'networking')
-rw-r--r-- | networking/ifupdown.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/networking/ifupdown.c b/networking/ifupdown.c index b53d2330d..adbc37e43 100644 --- a/networking/ifupdown.c +++ b/networking/ifupdown.c | |||
@@ -1048,7 +1048,7 @@ static char *run_mapping(char *physical, struct mapping_defn_t * map) | |||
1048 | /* If the mapping script exited successfully, try to | 1048 | /* If the mapping script exited successfully, try to |
1049 | * grab a line of output and use that as the name of the | 1049 | * grab a line of output and use that as the name of the |
1050 | * logical interface. */ | 1050 | * logical interface. */ |
1051 | char *new_logical = (char *)xmalloc(MAX_INTERFACE_LENGTH); | 1051 | char *new_logical = xmalloc(MAX_INTERFACE_LENGTH); |
1052 | 1052 | ||
1053 | if (fgets(new_logical, MAX_INTERFACE_LENGTH, out)) { | 1053 | if (fgets(new_logical, MAX_INTERFACE_LENGTH, out)) { |
1054 | /* If we are able to read a line of output from the script, | 1054 | /* If we are able to read a line of output from the script, |
@@ -1139,7 +1139,6 @@ int ifupdown_main(int argc, char **argv) | |||
1139 | llist_add_to_end(&target_list, argv[optind]); | 1139 | llist_add_to_end(&target_list, argv[optind]); |
1140 | } | 1140 | } |
1141 | 1141 | ||
1142 | |||
1143 | /* Update the interfaces */ | 1142 | /* Update the interfaces */ |
1144 | while (target_list) { | 1143 | while (target_list) { |
1145 | llist_t *iface_list; | 1144 | llist_t *iface_list; |
@@ -1255,8 +1254,7 @@ int ifupdown_main(int argc, char **argv) | |||
1255 | state_fp = xfopen("/var/run/ifstate", "w"); | 1254 | state_fp = xfopen("/var/run/ifstate", "w"); |
1256 | while (state_list) { | 1255 | while (state_list) { |
1257 | if (state_list->data) { | 1256 | if (state_list->data) { |
1258 | fputs(state_list->data, state_fp); | 1257 | fprintf(state_fp, "%s\n", state_list->data); |
1259 | fputc('\n', state_fp); | ||
1260 | } | 1258 | } |
1261 | state_list = state_list->link; | 1259 | state_list = state_list->link; |
1262 | } | 1260 | } |