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-nfapi.c | |
parent | fe5248717faa1c99a4d0c761fa8da63afffc5d3f (diff) |
Replace g_snprintf() with snprintf() (dissectors)
Use macros from inttypes.h with format strings.
Diffstat (limited to 'epan/dissectors/packet-nfapi.c')
-rw-r--r-- | epan/dissectors/packet-nfapi.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/epan/dissectors/packet-nfapi.c b/epan/dissectors/packet-nfapi.c index 2fef163466..0f6a9922d9 100644 --- a/epan/dissectors/packet-nfapi.c +++ b/epan/dissectors/packet-nfapi.c @@ -8588,53 +8588,53 @@ static void nfapi_tag_vals_fn(gchar* s, guint32 v) const tlv_t* tlv = look_up_tlv(v); if (tlv != 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%s (0x%x)", tlv->name, v); + snprintf(s, ITEM_LABEL_LENGTH, "%s (0x%x)", tlv->name, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%s (0x%x)", "Unknown", v); + snprintf(s, ITEM_LABEL_LENGTH, "%s (0x%x)", "Unknown", v); } } static void neg_pow_conversion_fn(gchar* s, guint8 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%d dB (%d)", ((gint16)v * (-1)), v); + snprintf(s, ITEM_LABEL_LENGTH, "%d dB (%d)", ((gint16)v * (-1)), v); } static void power_offset_conversion_fn(gchar* s, guint16 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2f dB (%d)", (((float)v * 0.001) - 6.0), v); + snprintf(s, ITEM_LABEL_LENGTH, "%.2f dB (%d)", (((float)v * 0.001) - 6.0), v); } static void reference_signal_power_conversion_fn(gchar* s, guint16 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2f dB (%d)", (((float)v * 0.25) - 63.75), v); + snprintf(s, ITEM_LABEL_LENGTH, "%.2f dB (%d)", (((float)v * 0.25) - 63.75), v); } static void laa_threshold_conversion_fn(gchar* s, guint16 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2f dB (%d)", (float)(v * -100.00), v); + snprintf(s, ITEM_LABEL_LENGTH, "%.2f dB (%d)", (float)(v * -100.00), v); } static void max_transmit_power_2_conversion_fn(gchar* s, guint16 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2f dB (%d)", ((float)v * 0.1) - 10.0, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.2f dB (%d)", ((float)v * 0.1) - 10.0, v); } static void max_transmit_power_conversion_fn(gchar* s, guint16 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2f dB (%d)", ((float)v * 0.1), v); + snprintf(s, ITEM_LABEL_LENGTH, "%.2f dB (%d)", ((float)v * 0.1), v); } static void sfn_sf_conversion_fn(gchar* s, guint16 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%d/%d (%d)", v >> 0x4, v & 0x000F, v); + snprintf(s, ITEM_LABEL_LENGTH, "%d/%d (%d)", v >> 0x4, v & 0x000F, v); } static void rssi_conversion_fn(gchar* s, guint16 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2f dB (%d)", ((float)v * 0.1), v); + snprintf(s, ITEM_LABEL_LENGTH, "%.2f dB (%d)", ((float)v * 0.1), v); } static void dl_rs_tx_pow_measment_conversion_fn(gchar* s, guint16 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2f dB (%d)", ((float)v * 0.1), v); + snprintf(s, ITEM_LABEL_LENGTH, "%.2f dB (%d)", ((float)v * 0.1), v); } static void ul_cqi_conversion_fn(gchar* s, guint16 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2f dB (%d)", (((float)v / 2 ) - 64.0), v); + snprintf(s, ITEM_LABEL_LENGTH, "%.2f dB (%d)", (((float)v / 2 ) - 64.0), v); } // ----------------------------------------------------------------------------| |