diff options
author | Jérémie Courrèges-Anglas <jca@wxcvbn.org> | 2014-01-03 22:18:51 +0100 |
---|---|---|
committer | Jérémie Courrèges-Anglas <jca@wxcvbn.org> | 2014-01-03 23:06:29 +0100 |
commit | b8d5ca85d9a6e6f42b8dbd6d47cab7bbcffeea90 (patch) | |
tree | a64f9b23e4f98279712d3d29bd37659996ce4c39 /src/completions.c | |
parent | 268732324fd37d9b001694a9206a66cce6681c20 (diff) | |
download | ratpoison-b8d5ca85d9a6e6f42b8dbd6d47cab7bbcffeea90.zip |
if (ptr) free(ptr) is not a good idiom.
Diffstat (limited to 'src/completions.c')
-rw-r--r-- | src/completions.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/completions.c b/src/completions.c index fc32c38..a047a50 100644 --- a/src/completions.c +++ b/src/completions.c @@ -53,8 +53,7 @@ completions_free (rp_completions *c) } /* Free the partial string. */ - if (c->partial) - free (c->partial); + free (c->partial); free (c); } @@ -88,8 +87,7 @@ completions_update (rp_completions *c, char *partial) new_list = c->complete_fn (partial); c->virgin = 0; - if (c->partial) - free (c->partial); + free (c->partial); c->partial = xstrdup (partial); completions_assign (c, new_list); |