summaryrefslogtreecommitdiffstats
path: root/cmd.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-07-24 18:46:40 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-07-24 18:46:40 +0000
commitc6dac5c3c96ecbc43abc3de16bdcb6569141c379 (patch)
tree7a03f8891186fa78c451c8201eeb7c26a744f108 /cmd.c
parent029599c02c23e5be84c21aabda1114ee0dc47c91 (diff)
cmd_find_index should return -2 on error.
Diffstat (limited to 'cmd.c')
-rw-r--r--cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd.c b/cmd.c
index 2bf4d46a..b13d0cc4 100644
--- a/cmd.c
+++ b/cmd.c
@@ -676,7 +676,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). */