summaryrefslogtreecommitdiff
path: root/librpc
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2013-10-09 17:47:29 +0200
committerGünther Deschner <gd@samba.org>2013-10-09 19:56:39 +0200
commitb197de754f5359f02f786bcd5e8a7671fb0bb48b (patch)
treea4154cc5786023426aebb27894a100034ed77cd2 /librpc
parent52416175dba7c359f0f324c6f0754c75a4cca18d (diff)
downloadsamba-b197de754f5359f02f786bcd5e8a7671fb0bb48b.tar.gz
samba-b197de754f5359f02f786bcd5e8a7671fb0bb48b.tar.bz2
samba-b197de754f5359f02f786bcd5e8a7671fb0bb48b.zip
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
Diffstat (limited to 'librpc')
-rw-r--r--librpc/ndr/ndr_basic.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/librpc/ndr/ndr_basic.c b/librpc/ndr/ndr_basic.c
index ae5af7a4a5..a6cf607f3e 100644
--- a/librpc/ndr/ndr_basic.c
+++ b/librpc/ndr/ndr_basic.c
@@ -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;