Code

argv: move report call to format_arg method
authorJonas Fonseca <fonseca@diku.dk>
Mon, 22 Mar 2010 01:10:57 +0000 (21:10 -0400)
committerJonas Fonseca <fonseca@diku.dk>
Tue, 30 Mar 2010 11:05:47 +0000 (07:05 -0400)
tig.c

diff --git a/tig.c b/tig.c
index 2c353d51ff075ef9e2d72519273243fc7aa2beae..826c3f9be45a5d907f0d5e26a7fd89c94c89de6a 100644 (file)
--- a/tig.c
+++ b/tig.c
@@ -3119,6 +3119,7 @@ format_arg(const char *name)
                if (!strncmp(name, vars[i].name, vars[i].namelen))
                        return *vars[i].value ? vars[i].value : vars[i].value_if_empty;
 
+       report("Unknown replacement: `%s`", name);
        return NULL;
 }
 
@@ -3150,7 +3151,6 @@ format_argv(const char *dst_argv[], const char *src_argv[], enum format_flags fl
                                value = format_arg(next);
 
                                if (!value) {
-                                       report("Unknown replacement: `%s`", next);
                                        return FALSE;
                                }
                        }