diff options
author | Anders Broman <anders.broman@ericsson.com> | 2009-10-25 11:43:30 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2009-10-25 11:43:30 +0000 |
commit | 88bb44a51e350c9749323242482dc5e944697d8f (patch) | |
tree | a19835aec094d07536c6def639d5d5d236f0a1cd /epan/dissectors/packet-hilscher.c | |
parent | 337896f4c6777bc0b84a2e017ebcbb52100a312b (diff) |
From Jakub Zawadzki:
Cleanup dissector code - use proper memory functions.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4164
svn path=/trunk/; revision=30691
Diffstat (limited to 'epan/dissectors/packet-hilscher.c')
-rw-r--r-- | epan/dissectors/packet-hilscher.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/epan/dissectors/packet-hilscher.c b/epan/dissectors/packet-hilscher.c index 5a87316a26..d5c17df281 100644 --- a/epan/dissectors/packet-hilscher.c +++ b/epan/dissectors/packet-hilscher.c @@ -94,11 +94,6 @@ dissect_hilscher_netanalyzer(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree proto_item *ti = NULL; guint gpio_num; guint gpio_edgex; - gchar *szInfo = NULL; - - #define MAX_BUFFER 60 - szInfo=ep_alloc(MAX_BUFFER); - szInfo[0]=0; col_set_str(pinfo->cinfo, COL_PROTOCOL, "netANALYZER"); @@ -118,12 +113,9 @@ dissect_hilscher_netanalyzer(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree gpio_edgex = (tvb_get_guint8(tvb, offset) & 0x01); if (gpio_edgex == 0x00) - g_snprintf(szInfo, MAX_BUFFER, "netANALYZER event on GPIO %d (positive edge)", gpio_num); + col_add_fstr(pinfo->cinfo, COL_INFO, "netANALYZER event on GPIO %d (positive edge)", gpio_num); else - g_snprintf(szInfo, MAX_BUFFER, "netANALYZER event on GPIO %d (negative edge)", gpio_num); - - if (check_col(pinfo->cinfo, COL_INFO)) - col_add_str(pinfo->cinfo, COL_INFO, szInfo); + col_add_fstr(pinfo->cinfo, COL_INFO, "netANALYZER event on GPIO %d (negative edge)", gpio_num); } |