aboutsummaryrefslogtreecommitdiffstats
path: root/epan/value_string.h
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2013-09-29 12:44:50 +0000
committerEvan Huus <eapache@gmail.com>2013-09-29 12:44:50 +0000
commitc1dd5d3882978b541cfb65c99b91813cbaed45ba (patch)
treea81bb59241271313fb73db4c60f8a471f2cbad62 /epan/value_string.h
parent640a45d707e1cbf0d21fffd445d770e811584628 (diff)
Replace some val_to_str calls with the equivalent val_to_str_const calls (and
implement rval_to_str_const to do this). The format-strings didn't have any parameter specifiers in them, so they were clearly never used (or they would have blown up) but still a bug. This is one of the first steps towards converting val_to_str and friends to wmem. I'm honestly not sure what the best approach is for the API in this case: the vast majority of usage is within dissectors, so just hard-coding packet scope (the way they currently hard-code ep_ scope) doesn't look terrible, but there are *some* uses in taps and other places that will need to be converted to something else if we go that route. Adding a wmem_pool parameter just for the uncommon case seems a bit like overkill, though perhaps it is the right thing to do. svn path=/trunk/; revision=52264
Diffstat (limited to 'epan/value_string.h')
-rw-r--r--epan/value_string.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/epan/value_string.h b/epan/value_string.h
index a2323e7738..1155a29ee5 100644
--- a/epan/value_string.h
+++ b/epan/value_string.h
@@ -159,6 +159,10 @@ const gchar*
rval_to_str(const guint32 val, const range_string *rs, const char *fmt);
WS_DLL_PUBLIC
+const gchar *
+rval_to_str_const(const guint32 val, const range_string *rs, const char *unknown_str);
+
+WS_DLL_PUBLIC
const gchar*
try_rval_to_str(const guint32 val, const range_string *rs);