summaryrefslogtreecommitdiff
path: root/usr.bin/tmux
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2009-07-15 15:09:18 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2009-07-15 15:09:18 +0000
commit2baa3e4c7906c6186c1235e9c1257ede945b9bf0 (patch)
treefecfc6e645dab416eec8565e6f86a3f05c1cdfc4 /usr.bin/tmux
parent452336ac02e8735e4477af5a83c9162289c2d5c8 (diff)
Return -1 not NULL on error, pointed out by Roy Marples.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r--usr.bin/tmux/cmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd.c b/usr.bin/tmux/cmd.c
index 1ac380ffd34..0e2cb44fd80 100644
--- a/usr.bin/tmux/cmd.c
+++ b/usr.bin/tmux/cmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd.c,v 1.5 2009/07/13 17:47:46 nicm Exp $ */
+/* $OpenBSD: cmd.c,v 1.6 2009/07/15 15:09:17 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -642,7 +642,7 @@ cmd_find_index(struct cmd_ctx *ctx, const char *arg, struct session **sp)
*/
if ((s = cmd_current_session(ctx)) == NULL) {
ctx->error(ctx, "can't establish current session");
- return (NULL);
+ return (-1);
}
/* A NULL argument means the current session and "no window" (-1). */