[git commit] parse_config: tweak indentation

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Tue Apr 17 16:28:33 UTC 2012


commit: http://git.uclibc.org/uClibc/commit/?id=238d11fd33fe85444fffc0cdd1a07cc70466a686
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master

and shuffle tokens memsetting around.
No obj-code changes.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
 libc/misc/internals/parse_config.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/libc/misc/internals/parse_config.c b/libc/misc/internals/parse_config.c
index c17d255..4d21b5e 100644
--- a/libc/misc/internals/parse_config.c
+++ b/libc/misc/internals/parse_config.c
@@ -75,8 +75,8 @@ static off_t bb_get_chunk_with_continuation(parser_t* parsr)
 			else
 				break;
 		} else if (parsr->allocated) {
-			 parsr->line_len += PAGE_SIZE;
-			 parsr->data = realloc(parsr->data,
+			parsr->line_len += PAGE_SIZE;
+			parsr->data = realloc(parsr->data,
 								   parsr->data_len + parsr->line_len);
 			parsr->line = parsr->data + parsr->data_len;
 		} else {
@@ -206,8 +206,6 @@ again:
 	len = bb_get_chunk_with_continuation(parser);
 	if (len == -1)
 		return 0;
-	*tokens = (char **) parser->data;
-	memset(*tokens, 0, sizeof(*tokens[0]) * ntokens);
 	line = parser->line;
 
 	/* Skip multiple token-delimiters in the start of line? */
@@ -217,6 +215,9 @@ again:
 	if (line[0] == '\0' || line[0] == delims[0])
 		goto again;
 
+	*tokens = (char **) parser->data;
+	memset(*tokens, 0, sizeof(*tokens[0]) * ntokens);
+
 	/* Tokenize the line */
 	for (t = 0; *line && *line != delims[0] && t < ntokens; t++) {
 		/* Pin token */


More information about the uClibc-cvs mailing list