summaryrefslogtreecommitdiffstats
path: root/cmd.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-11-21 17:52:18 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-11-21 17:52:18 +0000
commit9b9d26f80e2057488c1a8fe93dc729fdf6a9e9be (patch)
tree8f4e1a037f55be6ac14e31fd6946360ea00298fa /cmd.c
parent58688c48aa78173406c4037a6e8c0591ca3af591 (diff)
Use home from struct passwd if HOME is empty as well as if it is NULL, and fix
a style nit. Both from Tiago Cunha.
Diffstat (limited to 'cmd.c')
-rw-r--r--cmd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/cmd.c b/cmd.c
index 10e25225..902c390f 100644
--- a/cmd.c
+++ b/cmd.c
@@ -278,9 +278,8 @@ cmd_free(struct cmd *cmd)
size_t
cmd_print(struct cmd *cmd, char *buf, size_t len)
{
- if (cmd->entry->print == NULL) {
+ if (cmd->entry->print == NULL)
return (xsnprintf(buf, len, "%s", cmd->entry->name));
- }
return (cmd->entry->print(cmd, buf, len));
}