diff options
author | Michael Mann <mmann78@netscape.net> | 2015-09-11 19:38:05 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-09-13 00:15:35 +0000 |
commit | 648cf995b108ae2cb6df83e1144b32f34ffb8028 (patch) | |
tree | d56f6e5f8e9699ba63059f6318a17276c34997f5 /epan/to_str.c | |
parent | e4c0e510b8468861ec03f29859bf29c5c15edb99 (diff) | |
download | wireshark-648cf995b108ae2cb6df83e1144b32f34ffb8028.tar.gz |
Make other_decode_bitfield_value private to proto.c.
This is further encouragement to not try to manually create a bitstring while formatting a field.
Change-Id: I4efbeb39a210cf1fd26203cd8560859276b333b0
Reviewed-on: https://code.wireshark.org/review/10494
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/to_str.c')
-rw-r--r-- | epan/to_str.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/epan/to_str.c b/epan/to_str.c index 3e2aa7d9dd..b24eeff65a 100644 --- a/epan/to_str.c +++ b/epan/to_str.c @@ -1000,41 +1000,6 @@ decode_bits_in_field(const guint bit_offset, const gint no_of_bits, const guint6 return str; } -/* Generate, into "buf", a string showing the bits of a bitfield. - Return a pointer to the character after that string. */ -/*XXX this needs a buf_len check */ -char * -other_decode_bitfield_value(char *buf, const guint64 val, const guint64 mask, const int width) -{ - int i; - guint64 bit; - char *p; - - i = 0; - p = buf; - bit = G_GUINT64_CONSTANT(1) << (width - 1); - for (;;) { - if (mask & bit) { - /* This bit is part of the field. Show its value. */ - if (val & bit) - *p++ = '1'; - else - *p++ = '0'; - } else { - /* This bit is not part of the field. */ - *p++ = '.'; - } - bit >>= 1; - i++; - if (i >= width) - break; - if (i % 4 == 0) - *p++ = ' '; - } - *p = '\0'; - return p; -} - /* This function is very fast and this function is called a lot. XXX update the address_to_str stuff to use this function. |