diff options
author | Aaron Lehmann | 2002-11-28 11:27:31 +0000 |
---|---|---|
committer | Aaron Lehmann | 2002-11-28 11:27:31 +0000 |
commit | a170e1c858d35c474ceb9fecb41b37d681424094 (patch) | |
tree | cda2b13f10ca1ab0a3559d4b6ff663ed20d7106c /editors/awk.c | |
parent | 1652855fbc830f41c7ee56ece1a30b328c4fb395 (diff) | |
download | busybox-a170e1c858d35c474ceb9fecb41b37d681424094.zip busybox-a170e1c858d35c474ceb9fecb41b37d681424094.tar.gz |
Change if(x)free(x); to free(x);
Diffstat (limited to 'editors/awk.c')
-rw-r--r-- | editors/awk.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/editors/awk.c b/editors/awk.c index aea852b..44c2f45 100644 --- a/editors/awk.c +++ b/editors/awk.c @@ -650,7 +650,7 @@ static void clear_array(xhash *array) { while (hi) { thi = hi; hi = hi->next; - if (thi->data.v.string) free(thi->data.v.string); + free(thi->data.v.string); free(thi); } array->items[i] = NULL; @@ -661,7 +661,7 @@ static void clear_array(xhash *array) { /* clear a variable */ static var *clrvar(var *v) { - if (v->string && !(v->type & VF_FSTR)) + if (!(v->type & VF_FSTR)) free(v->string); v->type &= VF_DONTTOUCH; @@ -1504,7 +1504,7 @@ static void split_f0(void) { return; is_f0_split = TRUE; - if (fstrings) free(fstrings); + free(fstrings); fsrealloc(0); n = awk_split(getvar_s(V[F0]), &fsplitter.n, &fstrings); fsrealloc(n); @@ -2376,8 +2376,7 @@ re_cont: X.rsm = (rstream *)hash_search(fdhash, L.s); if (X.rsm) { R.i = X.rsm->is_pipe ? pclose(X.rsm->F) : fclose(X.rsm->F); - if (X.rsm->buffer) - free(X.rsm->buffer); + free(X.rsm->buffer); hash_remove(fdhash, L.s); } if (R.i != 0) |