From d6908dd9c2dcf4262632692ea554ff4fa4d99bee Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Wed, 15 Jul 2009 17:46:09 +0000 Subject: [PATCH] Return -1 not NULL on error, pointed out by Roy Marples. --- cmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd.c b/cmd.c index 69381973..2a9a8755 100644 --- a/cmd.c +++ b/cmd.c @@ -1,4 +1,4 @@ -/* $Id: cmd.c,v 1.102 2009-07-15 17:45:29 nicm Exp $ */ +/* $Id: cmd.c,v 1.103 2009-07-15 17:46:09 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -555,7 +555,7 @@ cmd_find_window(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 window. */