summaryrefslogtreecommitdiff
path: root/security/netpgpverify
diff options
context:
space:
mode:
Diffstat (limited to 'security/netpgpverify')
-rw-r--r--security/netpgpverify/files/pgpsum.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/security/netpgpverify/files/pgpsum.c b/security/netpgpverify/files/pgpsum.c
index 524c1fbd3af..6c3a39a7d87 100644
--- a/security/netpgpverify/files/pgpsum.c
+++ b/security/netpgpverify/files/pgpsum.c
@@ -175,7 +175,7 @@ swap16(uint16_t in)
u16 u;
u.i16 = in;
- return (u.i8[0] << 8) | u.i8[1];
+ return ((uint16_t)u.i8[0] << 8) | u.i8[1];
}
static inline uint32_t
@@ -184,7 +184,7 @@ swap32(uint32_t in)
u32 u;
u.i32 = in;
- return (u.i8[0] << 24) | (u.i8[1] << 16) | (u.i8[2] << 8) | u.i8[3];
+ return ((uint32_t)u.i8[0] << 24) | (u.i8[1] << 16) | (u.i8[2] << 8) | u.i8[3];
}
static inline int