diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2009-07-15 15:09:17 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2009-07-15 15:09:17 +0000 |
commit | 780fd8f7a6fde6f14016f3c4f94f04d8118859c1 (patch) | |
tree | aa9da57b522c7e76b2fe03838cf930388e99f102 | |
parent | aa3403a3432532984b7057c0f0a34d0c71133c1c (diff) |
Return -1 not NULL on error, pointed out by Roy Marples.
-rw-r--r-- | cmd.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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). */ |