summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2009-11-21 17:52:18 +0000
committernicm <nicm@openbsd.org>2009-11-21 17:52:18 +0000
commite54a8d16631893b00c0147a319e1ca814abfe3a1 (patch)
treeb18f6cd5686cbc1b8ea47beadeb783bf52bfe95d /usr.bin/tmux/cmd.c
parentreplacing malloc/realloc dance, by only one realloc (diff)
downloadwireguard-openbsd-e54a8d16631893b00c0147a319e1ca814abfe3a1.tar.xz
wireguard-openbsd-e54a8d16631893b00c0147a319e1ca814abfe3a1.zip
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 'usr.bin/tmux/cmd.c')
-rw-r--r--usr.bin/tmux/cmd.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.bin/tmux/cmd.c b/usr.bin/tmux/cmd.c
index c121d173614..2fd5eb0029a 100644
--- a/usr.bin/tmux/cmd.c
+++ b/usr.bin/tmux/cmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd.c,v 1.32 2009/11/18 13:16:33 nicm Exp $ */
+/* $OpenBSD: cmd.c,v 1.33 2009/11/21 17:52:18 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -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));
}