summaryrefslogtreecommitdiff
path: root/libbb/read.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/read.c')
-rw-r--r--libbb/read.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libbb/read.c b/libbb/read.c
index 640293b..4ad41d5 100644
--- a/libbb/read.c
+++ b/libbb/read.c
@@ -161,8 +161,7 @@ char *xmalloc_reads(int fd, char *buf)
}
/* nonblock_safe_read() because we are used by e.g. shells */
if (nonblock_safe_read(fd, p, 1) != 1) { /* EOF/error */
- if (p == buf) {
- /* we read nothing [and buf was NULL initially] */
+ if (p == buf) { /* we read nothing */
free(buf);
return NULL;
}