aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarkw <markw@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-04-17 17:30:44 +0000
committermarkw <markw@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-04-17 17:30:44 +0000
commit2988d6c210eb062e9c0355e16041da8912d101c6 (patch)
tree3093554ce4fa6be5a3c92adf47f2591728e573c7
parent9b015aa46ce76815e9860bd3e7ac8c7565233c16 (diff)
downloadbusybox-w32-2988d6c210eb062e9c0355e16041da8912d101c6.tar.gz
busybox-w32-2988d6c210eb062e9c0355e16041da8912d101c6.tar.bz2
busybox-w32-2988d6c210eb062e9c0355e16041da8912d101c6.zip
The tiniest of bracket-placement fixes.
git-svn-id: svn://busybox.net/trunk/busybox@2358 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r--findutils/grep.c7
-rw-r--r--grep.c7
2 files changed, 4 insertions, 10 deletions
diff --git a/findutils/grep.c b/findutils/grep.c
index b519adf18..12bcead7a 100644
--- a/findutils/grep.c
+++ b/findutils/grep.c
@@ -112,8 +112,7 @@ static void grep_file(FILE *file)
112 112
113 /* if we were told to print 'before' lines and there is at least 113 /* if we were told to print 'before' lines and there is at least
114 * one line in the circular buffer, print them */ 114 * one line in the circular buffer, print them */
115 if (lines_before && before_buf[prevpos] != NULL) 115 if (lines_before && before_buf[prevpos] != NULL) {
116 {
117 int first_buf_entry_line_num = linenum - lines_before; 116 int first_buf_entry_line_num = linenum - lines_before;
118 117
119 /* advance to the first entry in the circular buffer, and 118 /* advance to the first entry in the circular buffer, and
@@ -133,7 +132,6 @@ static void grep_file(FILE *file)
133 idx = (idx + 1) % lines_before; 132 idx = (idx + 1) % lines_before;
134 first_buf_entry_line_num++; 133 first_buf_entry_line_num++;
135 } 134 }
136
137 } 135 }
138 136
139 /* make a note that we need to print 'after' lines */ 137 /* make a note that we need to print 'after' lines */
@@ -145,8 +143,7 @@ static void grep_file(FILE *file)
145#ifdef BB_FEATURE_GREP_CONTEXT 143#ifdef BB_FEATURE_GREP_CONTEXT
146 else { /* no match */ 144 else { /* no match */
147 /* Add the line to the circular 'before' buffer */ 145 /* Add the line to the circular 'before' buffer */
148 if(lines_before) 146 if(lines_before) {
149 {
150 if(before_buf[curpos]) 147 if(before_buf[curpos])
151 free(before_buf[curpos]); 148 free(before_buf[curpos]);
152 before_buf[curpos] = strdup(line); 149 before_buf[curpos] = strdup(line);
diff --git a/grep.c b/grep.c
index b519adf18..12bcead7a 100644
--- a/grep.c
+++ b/grep.c
@@ -112,8 +112,7 @@ static void grep_file(FILE *file)
112 112
113 /* if we were told to print 'before' lines and there is at least 113 /* if we were told to print 'before' lines and there is at least
114 * one line in the circular buffer, print them */ 114 * one line in the circular buffer, print them */
115 if (lines_before && before_buf[prevpos] != NULL) 115 if (lines_before && before_buf[prevpos] != NULL) {
116 {
117 int first_buf_entry_line_num = linenum - lines_before; 116 int first_buf_entry_line_num = linenum - lines_before;
118 117
119 /* advance to the first entry in the circular buffer, and 118 /* advance to the first entry in the circular buffer, and
@@ -133,7 +132,6 @@ static void grep_file(FILE *file)
133 idx = (idx + 1) % lines_before; 132 idx = (idx + 1) % lines_before;
134 first_buf_entry_line_num++; 133 first_buf_entry_line_num++;
135 } 134 }
136
137 } 135 }
138 136
139 /* make a note that we need to print 'after' lines */ 137 /* make a note that we need to print 'after' lines */
@@ -145,8 +143,7 @@ static void grep_file(FILE *file)
145#ifdef BB_FEATURE_GREP_CONTEXT 143#ifdef BB_FEATURE_GREP_CONTEXT
146 else { /* no match */ 144 else { /* no match */
147 /* Add the line to the circular 'before' buffer */ 145 /* Add the line to the circular 'before' buffer */
148 if(lines_before) 146 if(lines_before) {
149 {
150 if(before_buf[curpos]) 147 if(before_buf[curpos])
151 free(before_buf[curpos]); 148 free(before_buf[curpos]);
152 before_buf[curpos] = strdup(line); 149 before_buf[curpos] = strdup(line);