diff options
author | Aaron Lehmann <aaronl@vitelius.com> | 2002-11-28 11:27:31 +0000 |
---|---|---|
committer | Aaron Lehmann <aaronl@vitelius.com> | 2002-11-28 11:27:31 +0000 |
commit | a170e1c858d35c474ceb9fecb41b37d681424094 (patch) | |
tree | cda2b13f10ca1ab0a3559d4b6ff663ed20d7106c /findutils | |
parent | 1652855fbc830f41c7ee56ece1a30b328c4fb395 (diff) | |
download | busybox-a170e1c858d35c474ceb9fecb41b37d681424094.tar.gz |
Change if(x)free(x); to free(x);
Diffstat (limited to 'findutils')
-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) else { /* no match */ /* Add the line to the circular 'before' buffer */ if(lines_before) { - if(before_buf[curpos]) - free(before_buf[curpos]); + free(before_buf[curpos]); before_buf[curpos] = xstrdup(line); curpos = (curpos + 1) % lines_before; } @@ -225,8 +224,7 @@ static void destroy_regexes(void) while (--nregexes >= 0) { regfree(&(regexes[nregexes])); } - if (regexes) - free(regexes); + free(regexes); } #endif |