diff options
author | Guy Harris <guy@alum.mit.edu> | 2003-09-10 20:07:10 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2003-09-10 20:07:10 +0000 |
commit | 4e21a36656caf0a4a75af2b9836e4eb23f161762 (patch) | |
tree | 497abb489105de92db83da25a91e7661dd38473c /packet-lwapp.c | |
parent | d4954b670048740c49a9e5a3576c2ae015efba66 (diff) | |
download | wireshark-4e21a36656caf0a4a75af2b9836e4eb23f161762.tar.gz wireshark-4e21a36656caf0a4a75af2b9836e4eb23f161762.tar.bz2 wireshark-4e21a36656caf0a4a75af2b9836e4eb23f161762.zip |
Don't use "alloca()", and don't use "match_strval()", just use
"val_to_str()".
svn path=/trunk/; revision=8449
Diffstat (limited to 'packet-lwapp.c')
-rw-r--r-- | packet-lwapp.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/packet-lwapp.c b/packet-lwapp.c index c4421dff73..6b31068d2f 100644 --- a/packet-lwapp.c +++ b/packet-lwapp.c @@ -3,7 +3,7 @@ * Routines for LWAPP encapsulated packet disassembly * draft-calhoun-seamoby-lwapp-N (the current draft is 3) * - * $Id: packet-lwapp.c,v 1.2 2003/08/29 22:57:55 guy Exp $ + * $Id: packet-lwapp.c,v 1.3 2003/09/10 20:07:10 guy Exp $ * * Copyright (c) 2003 by David Frascone <dave@frascone.com> * @@ -264,14 +264,8 @@ static void dissect_control(tvbuff_t *tvb, packet_info *pinfo, header.length = g_ntohs(header.length); if (check_col(pinfo->cinfo, COL_INFO)) { - gchar *description; - - description = match_strval(header.type, control_msg_vals); - if (!description) { - description = alloca(120); - sprintf(description, "Bad Type: 0x%02x", header.type); - } - col_append_str(pinfo->cinfo, COL_INFO, description); + col_append_str(pinfo->cinfo, COL_INFO, + val_to_str(header.type, control_msg_vals, "Bad Type: 0x%02x")); } /* In the interest of speed, if "tree" is NULL, don't do any work not |