Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/security/netpgpverify/files bring over change from src...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/fcd41716e04b
branches:  trunk
changeset: 430762:fcd41716e04b
user:      agc <agc%pkgsrc.org@localhost>
date:      Mon May 04 01:37:28 2020 +0000

description:
bring over change from src - cast return values

diffstat:

 security/netpgpverify/files/pgpsum.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r 6552a8c81030 -r fcd41716e04b security/netpgpverify/files/pgpsum.c
--- a/security/netpgpverify/files/pgpsum.c      Mon May 04 01:36:40 2020 +0000
+++ b/security/netpgpverify/files/pgpsum.c      Mon May 04 01:37:28 2020 +0000
@@ -175,7 +175,7 @@
        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 @@
        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



Home | Main Index | Thread Index | Old Index