From 22ee2764a7753c29133abebe83ba3c659f457b3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Valverde?= Date: Fri, 17 Dec 2021 20:05:19 +0000 Subject: Replace g_snprintf() with snprintf() (dissectors) Use macros from inttypes.h with format strings. --- epan/dissectors/packet-knxip_decrypt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'epan/dissectors/packet-knxip_decrypt.c') diff --git a/epan/dissectors/packet-knxip_decrypt.c b/epan/dissectors/packet-knxip_decrypt.c index 4eaba15a04..c881233eee 100644 --- a/epan/dissectors/packet-knxip_decrypt.c +++ b/epan/dissectors/packet-knxip_decrypt.c @@ -297,7 +297,7 @@ static void decrypt_key( guint8 key[] _U_, guint8 password_hash[] _U_, guint8 cr static void decode_and_decrypt_key( guint8 key[ BASE64_KNX_KEY_LENGTH + 1 ], const gchar* text, guint8 password_hash[], guint8 created_hash[] ) { gsize out_len; - g_snprintf( (gchar*) key, BASE64_KNX_KEY_LENGTH + 1, "%s", text ); + snprintf( (gchar*) key, BASE64_KNX_KEY_LENGTH + 1, "%s", text ); g_base64_decode_inplace( (gchar*) key, &out_len ); decrypt_key( key, password_hash, created_hash ); } @@ -503,7 +503,7 @@ static void add_ia_seq( guint16 ia, const gchar* text, FILE* f2 ) if( f2 ) { - fprintf( f2, "IA %u.%u.%u SeqNr %" G_GINT64_MODIFIER "u\n", (ia >> 12) & 0xF, (ia >> 8) & 0xF, ia & 0xFF, seq ); + fprintf( f2, "IA %u.%u.%u SeqNr %" PRIu64 "\n", (ia >> 12) & 0xF, (ia >> 8) & 0xF, ia & 0xFF, seq ); } ia_seq = wmem_new(wmem_epan_scope(), struct knx_keyring_ia_seqs); @@ -637,7 +637,7 @@ void read_knx_keyring_xml_file( const gchar* key_file, const gchar* password, co if( !tag_name_done ) // tag name { - g_snprintf( tag_name, sizeof tag_name, "%s", name ); + snprintf( tag_name, sizeof tag_name, "%s", name ); *name = '\0'; tag_name_done = 1; } -- cgit v1.2.3