aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
Diffstat (limited to 'libbb')
-rw-r--r--libbb/xfuncs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c
index f7300a6d9..54d291ab1 100644
--- a/libbb/xfuncs.c
+++ b/libbb/xfuncs.c
@@ -518,7 +518,7 @@ void bb_sanitize_stdio_maybe_daemonize(int daemonize)
518 int fd; 518 int fd;
519 /* Mega-paranoid */ 519 /* Mega-paranoid */
520 fd = xopen(bb_dev_null, O_RDWR); 520 fd = xopen(bb_dev_null, O_RDWR);
521 while (fd < 2) 521 while ((unsigned)fd < 2)
522 fd = dup(fd); /* have 0,1,2 open at least to /dev/null */ 522 fd = dup(fd); /* have 0,1,2 open at least to /dev/null */
523 if (daemonize) { 523 if (daemonize) {
524 pid_t pid = fork(); 524 pid_t pid = fork();