summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2019-05-22 13:15:19 +0000
committerAndreas Schneider <asn@cryptomilk.org>2019-06-04 22:13:07 +0000
commite2ee3f8943140df2e52c9778fe43feb544cda977 (patch)
tree1ebf4501a2bdd9095f35660851a91569908edd57 /source3/rpcclient
parenta497fa9bc3fd66230270fa6cfd1c5cfd535451e6 (diff)
downloadsamba-e2ee3f8943140df2e52c9778fe43feb544cda977.tar.gz
s3/rpcclient: cppcheck: Fix shiftTooManyBitsSigned error
Fixes source3/rpcclient/cmd_srvsvc.c:44: error: shiftTooManyBitsSigned: Shifting signed 32-bit value by 31 bits is undefined behaviour <--[cppcheck] Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/cmd_srvsvc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/rpcclient/cmd_srvsvc.c b/source3/rpcclient/cmd_srvsvc.c
index 2dec0400446..9c000608463 100644
--- a/source3/rpcclient/cmd_srvsvc.c
+++ b/source3/rpcclient/cmd_srvsvc.c
@@ -41,7 +41,7 @@ static char *get_server_type_str(uint32_t type)
typestr[0] = 0;
for (i = 0; i < 32; i++) {
- if (type & (1 << i)) {
+ if (type & ((uint32_t)1 << i)) {
switch (1 << i) {
case SV_TYPE_WORKSTATION:
fstrcat(typestr, "Wk ");