summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2019-06-26 17:57:06 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2019-06-27 17:10:40 +0200
commit420554a72ec9d408c158a9d4878ff401c2568559 (patch)
treec48bc94ac246f2439222b6dc5059b120a1517e50
parent2c97ae435e6b1b073fd2d311bb35dcd87dfa9a96 (diff)
downloadNetworkManager-420554a72ec9d408c158a9d4878ff401c2568559.tar.gz
clients: fix printing hexadecimal enum values
Use the 'x' conversion specifier for hexadecimal numbers. Fixes: f53218ed7cd7 ('cli: add property type for enum and showcase for ipv6.addr-gen-mode'):
-rw-r--r--clients/common/nm-meta-setting-desc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/clients/common/nm-meta-setting-desc.c b/clients/common/nm-meta-setting-desc.c
index e963290edd..c8268da6fc 100644
--- a/clients/common/nm-meta-setting-desc.c
+++ b/clients/common/nm-meta-setting-desc.c
@@ -1157,7 +1157,7 @@ _get_fcn_gobject_enum (ARGS_GET_FCN)
s = format_numeric_hex
|| ( format_numeric_hex_unknown
&& !G_IS_ENUM_CLASS (gtype_class ?: (gtype_class = g_type_class_ref (gtype))))
- ? g_strdup_printf ("0x%"G_GINT64_FORMAT, v)
+ ? g_strdup_printf ("0x%"G_GINT64_MODIFIER"x", v)
: g_strdup_printf ("%"G_GINT64_FORMAT, v);
RETURN_STR_TO_FREE (g_steal_pointer (&s));
}
@@ -1175,7 +1175,7 @@ _get_fcn_gobject_enum (ARGS_GET_FCN)
if ( format_numeric_hex
|| ( format_numeric_hex_unknown
&& !G_IS_ENUM_CLASS (gtype_class ?: (gtype_class = g_type_class_ref (gtype)))))
- nm_sprintf_buf (s_numeric, "0x%"G_GINT64_FORMAT, v);
+ nm_sprintf_buf (s_numeric, "0x%"G_GINT64_MODIFIER"x", v);
else
nm_sprintf_buf (s_numeric, "%"G_GINT64_FORMAT, v);