diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2019-06-05 06:44:08 +0100 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2019-06-05 06:44:08 +0100 |
commit | e252984993fdfd57a1fdc1eaf393e42e8589d623 (patch) | |
tree | 0f4f7beda1288b2990d0fd6691985e120411c2a2 /format.c | |
parent | 17bc11bd157db83fd90051824c289712fbac7eae (diff) | |
download | rtmux-e252984993fdfd57a1fdc1eaf393e42e8589d623.tar.gz rtmux-e252984993fdfd57a1fdc1eaf393e42e8589d623.tar.bz2 rtmux-e252984993fdfd57a1fdc1eaf393e42e8589d623.zip |
If only one of -x or -y is given, use the calculated size for the
other. Also fix some warnings. Pointed out by Ben Boeckel.
Diffstat (limited to 'format.c')
-rw-r--r-- | format.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -1518,7 +1518,7 @@ format_replace(struct format_tree *ft, const char *key, size_t keylen, char **buf, size_t *len, size_t *off) { struct window_pane *wp = ft->wp; - const char *errptr, *copy, *cp, *marker; + const char *errptr, *copy, *cp, *marker = NULL; char *copy0, *condition, *found, *new; char *value, *left, *right; size_t valuelen; @@ -1566,8 +1566,6 @@ format_replace(struct format_tree *ft, const char *key, size_t keylen, limit = 0; if (fm->argc == 2 && fm->argv[1] != NULL) marker = fm->argv[1]; - else - marker = NULL; break; case 'l': modifiers |= FORMAT_LITERAL; |