]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
tipc: fix clang warning about empty format string
authorStephen Hemminger <stephen@networkplumber.org>
Tue, 11 Jan 2022 17:54:35 +0000 (09:54 -0800)
committerDavid Ahern <dsahern@kernel.org>
Wed, 26 Jan 2022 17:19:08 +0000 (10:19 -0700)
When calling json_print with json only use a NULL instead of
empty string.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
tipc/link.c

index 9994ada2a36781a79a5240c6cab58bfceb00e6c4..53f49c8937db9f0b03383283e7e41c353b3d6588 100644 (file)
@@ -332,7 +332,7 @@ static int _show_link_stat(const char *name, struct nlattr *attrs[],
        open_json_object(NULL);
 
        print_string(PRINT_ANY, "link", "Link <%s>\n", name);
-       print_string(PRINT_JSON, "state", "", NULL);
+       print_string(PRINT_JSON, "state", NULL, NULL);
        open_json_array(PRINT_JSON, NULL);
        if (attrs[TIPC_NLA_LINK_ACTIVE])
                print_string(PRINT_ANY, NULL, "  %s", "ACTIVE");