summaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
Diffstat (limited to 'networking')
-rw-r--r--networking/ftpd.c4
-rw-r--r--networking/ifupdown.c4
2 files changed, 3 insertions, 5 deletions
diff --git a/networking/ftpd.c b/networking/ftpd.c
index 9937cc3..df8188c 100644
--- a/networking/ftpd.c
+++ b/networking/ftpd.c
@@ -691,9 +691,7 @@ handle_dir_common(int opts)
/* -n prevents user/groupname display,
* which can be problematic in chroot */
ls_fd = popen_ls((opts & LONG_LISTING) ? "-l" : "-1");
- ls_fp = fdopen(ls_fd, "r");
- if (!ls_fp) /* never happens. paranoia */
- bb_perror_msg_and_die("fdopen");
+ ls_fp = xfdopen_for_read(ls_fd);
if (opts & USE_CTRL_CONN) {
/* STAT <filename> */
diff --git a/networking/ifupdown.c b/networking/ifupdown.c
index 88d1944..b16186e 100644
--- a/networking/ifupdown.c
+++ b/networking/ifupdown.c
@@ -1056,8 +1056,8 @@ static int popen2(FILE **in, FILE **out, char *command, char *param)
/* parent */
close(infd.rd);
close(outfd.wr);
- *in = fdopen(infd.wr, "w");
- *out = fdopen(outfd.rd, "r");
+ *in = xfdopen_for_write(infd.wr);
+ *out = xfdopen_for_read(outfd.rd);
return pid;
}