aboutsummaryrefslogtreecommitdiff
path: root/findutils
diff options
context:
space:
mode:
authorAaron Lehmann <aaronl@vitelius.com>2002-11-28 11:27:31 +0000
committerAaron Lehmann <aaronl@vitelius.com>2002-11-28 11:27:31 +0000
commita170e1c858d35c474ceb9fecb41b37d681424094 (patch)
treecda2b13f10ca1ab0a3559d4b6ff663ed20d7106c /findutils
parent1652855fbc830f41c7ee56ece1a30b328c4fb395 (diff)
downloadbusybox-a170e1c858d35c474ceb9fecb41b37d681424094.tar.gz
Change if(x)free(x); to free(x);
Diffstat (limited to 'findutils')
-rw-r--r--findutils/grep.c6
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