diff options
author | Ulf Lamping <ulf.lamping@web.de> | 2005-08-08 18:50:39 +0000 |
---|---|---|
committer | Ulf Lamping <ulf.lamping@web.de> | 2005-08-08 18:50:39 +0000 |
commit | 0dc9fb3d4ab00d14bf45c597471e10e601efd4d4 (patch) | |
tree | ae44175ca8fd23548fcec5833098b535af5e372c /epan/dissectors/packet-dns.c | |
parent | f3407856f4fd97caf90655205cdb2c66991e75ba (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-dns.c')
-rw-r--r-- | epan/dissectors/packet-dns.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-dns.c b/epan/dissectors/packet-dns.c index 12333373e3..f0788d3d68 100644 --- a/epan/dissectors/packet-dns.c +++ b/epan/dissectors/packet-dns.c @@ -443,7 +443,7 @@ dns_type_description (guint type) short_name = dns_type_name(type); if (short_name == NULL) { - snprintf(strbuf, sizeof strbuf, "Unknown (%u)", type); + g_snprintf(strbuf, sizeof strbuf, "Unknown (%u)", type); return strbuf; } if (type < sizeof(type_names)/sizeof(type_names[0])) @@ -482,9 +482,9 @@ dns_type_description (guint type) } if (long_name != NULL) - snprintf(strbuf, sizeof strbuf, "%s (%s)", short_name, long_name); + g_snprintf(strbuf, sizeof strbuf, "%s (%s)", short_name, long_name); else - snprintf(strbuf, sizeof strbuf, "%s", short_name); + g_snprintf(strbuf, sizeof strbuf, "%s", short_name); return strbuf; } |