summaryrefslogtreecommitdiff
path: root/utility.c
diff options
context:
space:
mode:
authorMark Whitley2000-07-10 19:31:31 +0000
committerMark Whitley2000-07-10 19:31:31 +0000
commit9a8243aa1e8a8c7f34404401a1b23e6bb27a49bb (patch)
treeac333e017212807aecfb4d42f3cf9fdd1fab63ff /utility.c
parent928faac50328e4e2f4e42e041ba3f1f4568365bd (diff)
downloadbusybox-9a8243aa1e8a8c7f34404401a1b23e6bb27a49bb.zip
busybox-9a8243aa1e8a8c7f34404401a1b23e6bb27a49bb.tar.gz
Put the GROWBY variable inside the get_line_from_file function, as that is the
only function where it's used and it's always good to keep the namespace clean. :-)
Diffstat (limited to 'utility.c')
-rw-r--r--utility.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/utility.c b/utility.c
index a313078..97e0366 100644
--- a/utility.c
+++ b/utility.c
@@ -1599,13 +1599,14 @@ extern int find_real_root_device_name(char* name)
}
#endif
-static const int GROWBY = 80; /* how large we will grow strings by */
/* get_line_from_file() - This function reads an entire line from a text file
* up to a newline. It returns a malloc'ed char * which must be stored and
* free'ed by the caller. */
extern char *get_line_from_file(FILE *file)
{
+ static const int GROWBY = 80; /* how large we will grow strings by */
+
int ch;
int idx = 0;
char *linebuf = NULL;