diff options
author | Michael Mann <mmann78@netscape.net> | 2015-02-03 23:27:01 -0500 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2015-02-04 06:58:49 +0000 |
commit | 90a76e0d51faed8aff875eafce0a85e39de6ae5f (patch) | |
tree | 8cbce2e1420d88f7586089f0999c902cfdb1015f /ui/cli/tap-camelcounter.c | |
parent | 74547dba7e28a6fbc13cc2aa5d5327417357f075 (diff) |
Convert val_to_str -> val_to_str_wmem.
This is mostly for GUI usage, but a few dissectors needed some "non-packet scope" conversions.
val_to_str officially now uses wmem_packet_scope()
Change-Id: Ic9413eeb3406d7a7683222b86709f3675d628d81
Reviewed-on: https://code.wireshark.org/review/6933
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/cli/tap-camelcounter.c')
-rw-r--r-- | ui/cli/tap-camelcounter.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ui/cli/tap-camelcounter.c b/ui/cli/tap-camelcounter.c index d6e31d5f65..0eb40de997 100644 --- a/ui/cli/tap-camelcounter.c +++ b/ui/cli/tap-camelcounter.c @@ -68,6 +68,7 @@ static void camelcounter_draw(void *phs) { struct camelcounter_t * p_counter= (struct camelcounter_t *)phs; int i; + gchar *tmp_str; printf("\n"); printf("CAMEL Message and Response Status Counter:\n"); printf("------------------------------------------\n"); @@ -75,7 +76,9 @@ static void camelcounter_draw(void *phs) for (i=0; i<camel_MAX_NUM_OPR_CODES; i++) { /* Message counter */ if (p_counter->camel_msg[i] != 0) { - printf("%30s ", val_to_str(i, camel_opr_code_strings, "Unknown message ")); + tmp_str = val_to_str_wmem(NULL, i, camel_opr_code_strings, "Unknown message (%d)"); + printf("%30s ", tmp_str); + wmem_free(NULL, tmp_str); printf("%6d\n", p_counter->camel_msg[i]); } } /* Message Type */ |