diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2019-05-30 20:54:04 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2019-05-30 20:54:04 +0000 |
commit | fe07de97ab0239344d83fc9793787b184ed8d02a (patch) | |
tree | 456f0180e9bba34402d6587dde5162f742eccd63 /usr.bin/tmux/options.c | |
parent | 20916ad05100534c2e495225e013048260ca520f (diff) |
Remove a leftover abort and some fixes from cppcheck.
Diffstat (limited to 'usr.bin/tmux/options.c')
-rw-r--r-- | usr.bin/tmux/options.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/tmux/options.c b/usr.bin/tmux/options.c index c0a4b3ba2d3..b1031470045 100644 --- a/usr.bin/tmux/options.c +++ b/usr.bin/tmux/options.c @@ -1,4 +1,4 @@ -/* $OpenBSD: options.c,v 1.46 2019/05/23 14:03:44 nicm Exp $ */ +/* $OpenBSD: options.c,v 1.47 2019/05/30 20:54:03 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -365,7 +365,8 @@ options_array_set(struct options_entry *o, u_int idx, const char *value, pr = cmd_parse_from_string(value, NULL); switch (pr->status) { case CMD_PARSE_EMPTY: - *cause = xstrdup("empty command"); + if (cause != NULL) + *cause = xstrdup("empty command"); return (-1); case CMD_PARSE_ERROR: if (cause != NULL) |