From 780fd8f7a6fde6f14016f3c4f94f04d8118859c1 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Wed, 15 Jul 2009 15:09:17 +0000 Subject: [PATCH] Return -1 not NULL on error, pointed out by Roy Marples. --- cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd.c b/cmd.c index a2264081..f2466216 100644 --- a/cmd.c +++ b/cmd.c @@ -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). */