summaryrefslogtreecommitdiffstats
path: root/cmd.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2009-07-25 08:59:38 +0000
committerTiago Cunha <tcunha@gmx.com>2009-07-25 08:59:38 +0000
commit2386fa2355067161b4b4cd24b1a146cf524b5ddf (patch)
tree6b52d4fa325ae1a084980137433ab0fa8672b62f /cmd.c
parent723f363c07e66c3b03bb2f52cac0ca2aabd248d8 (diff)
Sync OpenBSD patchset 178:
cmd_find_index should return -2 on error.
Diffstat (limited to 'cmd.c')
-rw-r--r--cmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd.c b/cmd.c
index 4e2c5548..7e17d071 100644
--- a/cmd.c
+++ b/cmd.c
@@ -1,4 +1,4 @@
-/* $Id: cmd.c,v 1.107 2009-07-23 13:06:31 tcunha Exp $ */
+/* $Id: cmd.c,v 1.108 2009-07-25 08:59:38 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -675,7 +675,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 (-1);
+ return (-2);
}
/* A NULL argument means the current session and "no window" (-1). */