1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-23 09:57:40 +03:00

s3/libads: cppcheck fix error: shiftTooManyBitsSigned: error

Squash 'Shifting signed 32-bit value by 31 bits is undefined behaviour'
error

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
Noel Power 2019-05-21 10:52:56 +00:00 committed by Noel Power
parent fd3f37af92
commit f5af3cb21e

View File

@ -73,7 +73,7 @@ static void ads_disp_perms(uint32_t type)
}
for (i = 0; i < 32; i++) {
if (type & (1 << i)) {
if (type & ((uint32_t)1 << i)) {
for (j = 1; perms[j].str; j ++) {
if (perms[j].mask == (((unsigned) 1) << i)) {
printf("\n\t%s (0x%08x)", perms[j].str, perms[j].mask);