summaryrefslogtreecommitdiffstats
path: root/cmd-string.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2010-01-31 18:47:03 +0000
committerNicholas Marriott <nicm@openbsd.org>2010-01-31 18:47:03 +0000
commitc29bfd2ff30016faa970e903fcbb488a86335d88 (patch)
tree02d488df8480abedc60b664c4c4a31c680f2e1eb /cmd-string.c
parent383c682563b839f57555be656b3ca2612da79f99 (diff)
Remove unnecessary comparison, pointed out by Tiago Cunha.
Diffstat (limited to 'cmd-string.c')
-rw-r--r--cmd-string.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/cmd-string.c b/cmd-string.c
index 27b051b1..a5dabb56 100644
--- a/cmd-string.c
+++ b/cmd-string.c
@@ -344,8 +344,7 @@ cmd_string_expand_tilde(const char *s, size_t *p)
return (NULL);
if ((pw = getpwnam(username)) != NULL)
home = pw->pw_dir;
- if (username != NULL)
- xfree(username);
+ xfree(username);
}
if (home == NULL)
return (NULL);