From a6dbb08a48903cb8f31fad2cf2d1cffa92bd4808 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Thu, 12 Oct 2006 19:29:44 +0000 Subject: small style fixes --- libbb/fgets_str.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'libbb/fgets_str.c') diff --git a/libbb/fgets_str.c b/libbb/fgets_str.c index 8f06fa59c..41370d176 100644 --- a/libbb/fgets_str.c +++ b/libbb/fgets_str.c @@ -44,12 +44,14 @@ char *fgets_str(FILE *file, const char *terminating_string) /* Check for terminating string */ end_string_offset = idx - term_length; - if ((end_string_offset > 0) && (memcmp(&linebuf[end_string_offset], terminating_string, term_length) == 0)) { + if (end_string_offset > 0 + && memcmp(&linebuf[end_string_offset], terminating_string, term_length) == 0 + ) { idx -= term_length; break; } } + linebuf = xrealloc(linebuf, idx + 1); linebuf[idx] = '\0'; - return(linebuf); + return linebuf; } - -- cgit v1.2.3