diff options
author | markw <markw@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2000-07-10 19:31:31 +0000 |
---|---|---|
committer | markw <markw@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2000-07-10 19:31:31 +0000 |
commit | f70a4fdad4e6fcdeee928f7ec9d4289037ca5e5d (patch) | |
tree | ac333e017212807aecfb4d42f3cf9fdd1fab63ff | |
parent | cbc0701056ab3a67736ec55e8cbdecb0afd4b322 (diff) | |
download | busybox-w32-f70a4fdad4e6fcdeee928f7ec9d4289037ca5e5d.tar.gz busybox-w32-f70a4fdad4e6fcdeee928f7ec9d4289037ca5e5d.tar.bz2 busybox-w32-f70a4fdad4e6fcdeee928f7ec9d4289037ca5e5d.zip |
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. :-)
git-svn-id: svn://busybox.net/trunk/busybox@801 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r-- | utility.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1599,13 +1599,14 @@ extern int find_real_root_device_name(char* name) | |||
1599 | } | 1599 | } |
1600 | #endif | 1600 | #endif |
1601 | 1601 | ||
1602 | static const int GROWBY = 80; /* how large we will grow strings by */ | ||
1603 | 1602 | ||
1604 | /* get_line_from_file() - This function reads an entire line from a text file | 1603 | /* get_line_from_file() - This function reads an entire line from a text file |
1605 | * up to a newline. It returns a malloc'ed char * which must be stored and | 1604 | * up to a newline. It returns a malloc'ed char * which must be stored and |
1606 | * free'ed by the caller. */ | 1605 | * free'ed by the caller. */ |
1607 | extern char *get_line_from_file(FILE *file) | 1606 | extern char *get_line_from_file(FILE *file) |
1608 | { | 1607 | { |
1608 | static const int GROWBY = 80; /* how large we will grow strings by */ | ||
1609 | |||
1609 | int ch; | 1610 | int ch; |
1610 | int idx = 0; | 1611 | int idx = 0; |
1611 | char *linebuf = NULL; | 1612 | char *linebuf = NULL; |