aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
Diffstat (limited to 'libbb')
-rw-r--r--libbb/fgets_str.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libbb/fgets_str.c b/libbb/fgets_str.c
index 7d41d72f1..33d8d00cc 100644
--- a/libbb/fgets_str.c
+++ b/libbb/fgets_str.c
@@ -55,7 +55,7 @@ char *fgets_str(FILE *file, const char *terminating_string)
55 break; 55 break;
56 } 56 }
57 } 57 }
58 if (idx == 0 || linebuf[0] == '\n') { 58 if (idx == 0) {
59 return NULL; 59 return NULL;
60 } 60 }
61 linebuf[idx] = '\0'; 61 linebuf[idx] = '\0';