diff options
author | Thomas Haller <thaller@redhat.com> | 2019-04-18 15:40:40 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2019-04-18 20:18:17 +0200 |
commit | dfb899f465e0e112daf45ca5f9499aab27fcf524 (patch) | |
tree | aa1c84f1f8ff9f9b4d77b4cc94b454949254630d | |
parent | 9740bd6d99e50b91b498163a2984fa6325a25386 (diff) | |
download | NetworkManager-dfb899f465e0e112daf45ca5f9499aab27fcf524.tar.gz |
platform: fix nm_platform_lnk_gre_to_string() for tap links
Why didn't we get a compiler warning about this bug?
At least clang (3.8.0-2ubuntu4, Ubuntu 16.04) warns:
CC src/platform/src_libNetworkManagerBase_la-nm-platform.lo
../src/platform/nm-platform.c:5389:14: error: data argument not used by format string [-Werror,-Wformat-extra-args]
lnk->remote ? nm_sprintf_buf (str_remote, " remote %s", nm_utils_inet4_ntop (lnk->remote, str_remote1)) : "",
^
Fixes: 4c2862b9589c ('platform: add gretap tunnels support')
-rw-r--r-- | src/platform/nm-platform.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/platform/nm-platform.c b/src/platform/nm-platform.c index 504d643197..1fc0ccb750 100644 --- a/src/platform/nm-platform.c +++ b/src/platform/nm-platform.c @@ -5374,7 +5374,7 @@ nm_platform_lnk_gre_to_string (const NMPlatformLnkGre *lnk, char *buf, gsize len return buf; g_snprintf (buf, len, - lnk->is_tap ? "gretap" : "gre" + "gre%s" /* is_tap */ "%s" /* remote */ "%s" /* local */ "%s" /* parent_ifindex */ @@ -5386,6 +5386,7 @@ nm_platform_lnk_gre_to_string (const NMPlatformLnkGre *lnk, char *buf, gsize len "%s" /* ikey */ "%s" /* okey */ "", + lnk->is_tap ? "tap" : "", lnk->remote ? nm_sprintf_buf (str_remote, " remote %s", nm_utils_inet4_ntop (lnk->remote, str_remote1)) : "", lnk->local ? nm_sprintf_buf (str_local, " local %s", nm_utils_inet4_ntop (lnk->local, str_local1)) : "", lnk->parent_ifindex ? nm_sprintf_buf (str_parent_ifindex, " dev %d", lnk->parent_ifindex) : "", |