From 4e21a36656caf0a4a75af2b9836e4eb23f161762 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Wed, 10 Sep 2003 20:07:10 +0000 Subject: Don't use "alloca()", and don't use "match_strval()", just use "val_to_str()". svn path=/trunk/; revision=8449 --- packet-lwapp.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'packet-lwapp.c') 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 * @@ -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 -- cgit v1.2.3