diff options
author | João Valverde <j@v6e.pt> | 2021-12-17 20:05:19 +0000 |
---|---|---|
committer | João Valverde <j@v6e.pt> | 2021-12-19 20:25:11 +0000 |
commit | 22ee2764a7753c29133abebe83ba3c659f457b3d (patch) | |
tree | 3e75d8be1100d0f2f69687e02879a684cf48796f /epan/dissectors/packet-lldp.c | |
parent | fe5248717faa1c99a4d0c761fa8da63afffc5d3f (diff) |
Replace g_snprintf() with snprintf() (dissectors)
Use macros from inttypes.h with format strings.
Diffstat (limited to 'epan/dissectors/packet-lldp.c')
-rw-r--r-- | epan/dissectors/packet-lldp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-lldp.c b/epan/dissectors/packet-lldp.c index cbcd234a13..3f63189f07 100644 --- a/epan/dissectors/packet-lldp.c +++ b/epan/dissectors/packet-lldp.c @@ -1311,12 +1311,12 @@ static const unit_name_string units_m = { " m", NULL }; static void mdi_power_base(gchar *buf, guint32 value) { - g_snprintf(buf, ITEM_LABEL_LENGTH, "%u.%u. Watt", value/10, value%10); + snprintf(buf, ITEM_LABEL_LENGTH, "%u.%u. Watt", value/10, value%10); } static void media_power_base(gchar *buf, guint32 value) { - g_snprintf(buf, ITEM_LABEL_LENGTH, "%u mW", value * 100); + snprintf(buf, ITEM_LABEL_LENGTH, "%u mW", value * 100); } /* Calculate Latitude and Longitude string */ @@ -1374,7 +1374,7 @@ get_latitude_or_longitude(gchar *buf, int option, guint64 unmasked_value) direction = "East"; } - g_snprintf(buf, ITEM_LABEL_LENGTH, "%u.%04" G_GINT64_MODIFIER "u degrees %s (0x%010" G_GINT64_MODIFIER "X)", + snprintf(buf, ITEM_LABEL_LENGTH, "%u.%04" PRIu64 " degrees %s (0x%010" PRIX64 ")", integerPortion, tempValue, direction, value); } |