mirror of
https://github.com/samba-team/samba.git
synced 2025-03-29 02:50:28 +03:00
libndr: Avoid ommitting display of unset bitmap flags.
In 816e68f94fe500b9d68fd29021d432b84d3139b7 the display of unset bits has been effectively disabled while only the check for 0 bits was supposed to be avoided (because it creates the infite loop). Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Wed Oct 9 19:56:39 CEST 2013 on sn-devel-104
This commit is contained in:
parent
52416175db
commit
b197de754f
@ -1017,13 +1017,13 @@ _PUBLIC_ void ndr_print_enum(struct ndr_print *ndr, const char *name, const char
|
||||
|
||||
_PUBLIC_ void ndr_print_bitmap_flag(struct ndr_print *ndr, size_t size, const char *flag_name, uint32_t flag, uint32_t value)
|
||||
{
|
||||
/* this is an attempt to support multi-bit bitmap masks */
|
||||
value &= flag;
|
||||
|
||||
if (value == 0) {
|
||||
if (flag == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* this is an attempt to support multi-bit bitmap masks */
|
||||
value &= flag;
|
||||
|
||||
while (!(flag & 1)) {
|
||||
flag >>= 1;
|
||||
value >>= 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user