summaryrefslogtreecommitdiffstats
path: root/nsprpub/pr/src/misc/praton.c
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-02-06 11:40:35 +0100
committerwolfbeast <mcwerewolf@gmail.com>2018-02-06 11:40:35 +0100
commit7c728b3c7680662fc4e92b5d03697b8339560b08 (patch)
tree4a0da02f99913e0d52acd52067ad5a7be29e99a3 /nsprpub/pr/src/misc/praton.c
parent13e9a0c06d35bb02d211df873c105a350aeab8eb (diff)
downloadUXP-7c728b3c7680662fc4e92b5d03697b8339560b08.tar
UXP-7c728b3c7680662fc4e92b5d03697b8339560b08.tar.gz
UXP-7c728b3c7680662fc4e92b5d03697b8339560b08.tar.lz
UXP-7c728b3c7680662fc4e92b5d03697b8339560b08.tar.xz
UXP-7c728b3c7680662fc4e92b5d03697b8339560b08.zip
Update NSPR to 4.16
Diffstat (limited to 'nsprpub/pr/src/misc/praton.c')
-rw-r--r--nsprpub/pr/src/misc/praton.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/nsprpub/pr/src/misc/praton.c b/nsprpub/pr/src/misc/praton.c
index bff0cd151..80c0628cc 100644
--- a/nsprpub/pr/src/misc/praton.c
+++ b/nsprpub/pr/src/misc/praton.c
@@ -177,19 +177,21 @@ pr_inet_aton(const char *cp, PRUint32 *addr)
case 2: /*%< a.b -- 8.24 bits */
if (val > 0xffffffU)
return (0);
- val |= parts[0] << 24;
+ val |= (unsigned int)parts[0] << 24;
break;
case 3: /*%< a.b.c -- 8.8.16 bits */
if (val > 0xffffU)
return (0);
- val |= (parts[0] << 24) | (parts[1] << 16);
+ val |= ((unsigned int)parts[0] << 24) | ((unsigned int)parts[1] << 16);
break;
case 4: /*%< a.b.c.d -- 8.8.8.8 bits */
if (val > 0xffU)
return (0);
- val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8);
+ val |= ((unsigned int)parts[0] << 24) |
+ ((unsigned int)parts[1] << 16) |
+ ((unsigned int)parts[2] << 8);
break;
}
*addr = PR_htonl(val);