aboutsummaryrefslogtreecommitdiff
path: root/format.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2019-06-05 06:44:08 +0100
committerNicholas Marriott <nicholas.marriott@gmail.com>2019-06-05 06:44:08 +0100
commite252984993fdfd57a1fdc1eaf393e42e8589d623 (patch)
tree0f4f7beda1288b2990d0fd6691985e120411c2a2 /format.c
parent17bc11bd157db83fd90051824c289712fbac7eae (diff)
downloadrtmux-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.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/format.c b/format.c
index 45479d5e..5ca970b7 100644
--- a/format.c
+++ b/format.c
@@ -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;