aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-wtls.c
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2005-08-08 18:50:39 +0000
committerUlf Lamping <ulf.lamping@web.de>2005-08-08 18:50:39 +0000
commit0dc9fb3d4ab00d14bf45c597471e10e601efd4d4 (patch)
treeae44175ca8fd23548fcec5833098b535af5e372c /epan/dissectors/packet-wtls.c
parentf3407856f4fd97caf90655205cdb2c66991e75ba (diff)
various code cleanup:
-use g_snprintf instead of sprintf and snprintf -use g_strdup_printf where appropriate -remove #include "snprintf.h" (as only g_snprintf should be used) -replace some more alloc/realloc/calloc/free with their glib pendants svn path=/trunk/; revision=15264
Diffstat (limited to 'epan/dissectors/packet-wtls.c')
-rw-r--r--epan/dissectors/packet-wtls.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/epan/dissectors/packet-wtls.c b/epan/dissectors/packet-wtls.c
index 8ce0374af6..9995cb6aa6 100644
--- a/epan/dissectors/packet-wtls.c
+++ b/epan/dissectors/packet-wtls.c
@@ -34,10 +34,6 @@
#include <stdio.h>
#include <stdlib.h>
-#ifdef NEED_SNPRINTF_H
-# include "snprintf.h"
-#endif
-
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
@@ -804,22 +800,22 @@ dissect_wtls_handshake(proto_tree *tree, tvbuff_t *tvb, guint offset, guint coun
{
if (valMac != NULL)
{
- snprintf(valStr,1024,"%s, %s",valBulk,valMac);
+ g_snprintf(valStr,1024,"%s, %s",valBulk,valMac);
}
else
{
- snprintf(valStr,1024,"%s, Unknown MAC (0x%02x)",valBulk,tvb_get_guint8 (tvb, offset));
+ g_snprintf(valStr,1024,"%s, Unknown MAC (0x%02x)",valBulk,tvb_get_guint8 (tvb, offset));
}
}
else
{
if (valMac != NULL)
{
- snprintf(valStr,1024,"Unknown Bulk (0x%02x), %s",value,valMac);
+ g_snprintf(valStr,1024,"Unknown Bulk (0x%02x), %s",value,valMac);
}
else
{
- snprintf(valStr,1024,"Unknown Bulk (0x%02x), Unknown MAC (0x%02x)",value,
+ g_snprintf(valStr,1024,"Unknown Bulk (0x%02x), Unknown MAC (0x%02x)",value,
tvb_get_guint8 (tvb, offset));
}
}