From 0be3a6524faa63ea7225dbda8e8aff8ab2be5bf7 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Wed, 5 Dec 2007 10:27:49 +0000 Subject: To generate a session-lifetime string given a format and va_list, use se_strdup_vprintf(). svn path=/trunk/; revision=23765 --- plugins/wimax/packet-wmx.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'plugins') diff --git a/plugins/wimax/packet-wmx.c b/plugins/wimax/packet-wmx.c index b737196720..46c3f84dae 100644 --- a/plugins/wimax/packet-wmx.c +++ b/plugins/wimax/packet-wmx.c @@ -747,13 +747,7 @@ proto_tree *add_protocol_subtree(tlv_info_t *this, gint idx, proto_tree *tree, i tlv_type = get_tlv_type(this); /* display the TLV name and display the value in hex. Highlight type, length, and value. */ - if( (message = se_alloc_array(gchar, 255)) ){ - va_start(ap, format); - vsprintf(message, format, ap); - va_end(ap); - } else { - message = "Memory error"; - } + message = se_strdup_vprintf(format, ap); tlv_item = proto_tree_add_protocol_format(tree, hfindex, tvb, start, length, "%s", message); /* Correct the highlighting. */ tlv_item->finfo->start -= tlv_val_offset; -- cgit v1.2.3