diff options
author | aaronl <aaronl@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2002-11-28 11:27:31 +0000 |
---|---|---|
committer | aaronl <aaronl@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2002-11-28 11:27:31 +0000 |
commit | 59b0f5c27b3eec8ce589d520b5a13cd3db0d8203 (patch) | |
tree | cda2b13f10ca1ab0a3559d4b6ff663ed20d7106c /findutils/grep.c | |
parent | b93e459224de0e63b0dcfb691aecbefac4bf665a (diff) | |
download | busybox-w32-59b0f5c27b3eec8ce589d520b5a13cd3db0d8203.tar.gz busybox-w32-59b0f5c27b3eec8ce589d520b5a13cd3db0d8203.tar.bz2 busybox-w32-59b0f5c27b3eec8ce589d520b5a13cd3db0d8203.zip |
Change if(x)free(x); to free(x);
git-svn-id: svn://busybox.net/trunk/busybox@6055 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'findutils/grep.c')
-rw-r--r-- | findutils/grep.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/findutils/grep.c b/findutils/grep.c index 6fe183325..cc2b697e8 100644 --- a/findutils/grep.c +++ b/findutils/grep.c | |||
@@ -153,8 +153,7 @@ static void grep_file(FILE *file) | |||
153 | else { /* no match */ | 153 | else { /* no match */ |
154 | /* Add the line to the circular 'before' buffer */ | 154 | /* Add the line to the circular 'before' buffer */ |
155 | if(lines_before) { | 155 | if(lines_before) { |
156 | if(before_buf[curpos]) | 156 | free(before_buf[curpos]); |
157 | free(before_buf[curpos]); | ||
158 | before_buf[curpos] = xstrdup(line); | 157 | before_buf[curpos] = xstrdup(line); |
159 | curpos = (curpos + 1) % lines_before; | 158 | curpos = (curpos + 1) % lines_before; |
160 | } | 159 | } |
@@ -225,8 +224,7 @@ static void destroy_regexes(void) | |||
225 | while (--nregexes >= 0) { | 224 | while (--nregexes >= 0) { |
226 | regfree(&(regexes[nregexes])); | 225 | regfree(&(regexes[nregexes])); |
227 | } | 226 | } |
228 | if (regexes) | 227 | free(regexes); |
229 | free(regexes); | ||
230 | } | 228 | } |
231 | #endif | 229 | #endif |
232 | 230 | ||