Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2018-09-02 19:35:29 +0300
committerDenys Vlasenko <vda.linux@googlemail.com>2018-09-02 19:48:50 +0300
commit2993551efcb09ace35b40db608ab08159834692b (patch)
tree620ad414a2ee593dec5555a0d1155a5843291da4
parentab4caf099ce6f2cc573524281ca1429ee59bae6c (diff)
Revert "libbb: remove unnecessary variable in xmalloc_fgets"
The variable is in fact necessary. commit 2da9724b56169f00bd7fb6b9a11c9409a7620981 Author: Quentin Rameau <quinq@fifth.space> Date: Sun Apr 1 17:05:35 2018 +0200 libbb: remove unnecessary variable in xmalloc_fgets Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--libbb/get_line_from_file.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libbb/get_line_from_file.c b/libbb/get_line_from_file.c
index f3d6c6203..903ff1fb6 100644
--- a/libbb/get_line_from_file.c
+++ b/libbb/get_line_from_file.c
@@ -47,7 +47,9 @@ char* FAST_FUNC bb_get_chunk_from_file(FILE *file, size_t *end)
/* Get line, including trailing \n if any */
char* FAST_FUNC xmalloc_fgets(FILE *file)
{
- return bb_get_chunk_from_file(file, NULL);
+ size_t i;
+
+ return bb_get_chunk_from_file(file, &i);
}
/* Get line. Remove trailing \n */
char* FAST_FUNC xmalloc_fgetline(FILE *file)