[git commit] libbb: remove unnecessary variable in xmalloc_fgets

Denys Vlasenko vda.linux at googlemail.com
Sun Apr 1 17:45:36 UTC 2018


commit: https://git.busybox.net/busybox/commit/?id=2da9724b56169f00bd7fb6b9a11c9409a7620981
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Quentin Rameau <quinq at fifth.space>
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 libbb/get_line_from_file.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/libbb/get_line_from_file.c b/libbb/get_line_from_file.c
index cc61a9265..941ea12b5 100644
--- a/libbb/get_line_from_file.c
+++ b/libbb/get_line_from_file.c
@@ -44,9 +44,7 @@ char* FAST_FUNC bb_get_chunk_from_file(FILE *file, int *end)
 /* Get line, including trailing \n if any */
 char* FAST_FUNC xmalloc_fgets(FILE *file)
 {
-	int i;
-
-	return bb_get_chunk_from_file(file, &i);
+	return bb_get_chunk_from_file(file, NULL);
 }
 /* Get line.  Remove trailing \n */
 char* FAST_FUNC xmalloc_fgetline(FILE *file)


More information about the busybox-cvs mailing list