diff options
author | Michael Mann <mmann78@netscape.net> | 2015-01-07 18:24:17 -0500 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2015-01-08 05:46:26 +0000 |
commit | 5d610b58c5c45c0bb555d227a684785a0721f434 (patch) | |
tree | 2827c2eb068f2a5a45c6ce3cbd51138f9922f0a8 /epan/to_str.c | |
parent | 4a5ca5c76e199694bba8a21418f52ca0f30322d1 (diff) |
Remove decode_numeric_bitfield.
It was only used by 1 dissector and that dissector can just use bitmasking in the hf_ field.
Change-Id: I99179356dd7cbfab0c7be1512357a7e4c0eecde6
Reviewed-on: https://code.wireshark.org/review/6390
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/to_str.c')
-rw-r--r-- | epan/to_str.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/epan/to_str.c b/epan/to_str.c index b2b0e14181..6c4cecb249 100644 --- a/epan/to_str.c +++ b/epan/to_str.c @@ -980,27 +980,6 @@ decode_bitfield_value(char *buf, const guint64 val, const guint64 mask, const in return p; } -/* Generate a string describing a numeric bitfield (an N-bit field whose - value is just a number). */ -const char * -decode_numeric_bitfield(const guint64 val, const guint64 mask, const int width, - const char *fmt) -{ - char *buf; - char *p; - int shift = 0; - - buf=(char *)ep_alloc(1025); /* isn't this a bit overkill? */ - /* Compute the number of bits we have to shift the bitfield right - to extract its value. */ - while ((mask & (G_GUINT64_CONSTANT(1) << shift)) == 0) - shift++; - - p = decode_bitfield_value(buf, val, mask, width); - g_snprintf(p, (gulong) (1025-(p-buf)), fmt, (val & mask) >> shift); - return buf; -} - /* This function is very fast and this function is called a lot. XXX update the address_to_str stuff to use this function. |