diff options
author | Steve Holme <steve_holme@hotmail.com> | 2016-03-20 11:14:58 +0000 |
---|---|---|
committer | Steve Holme <steve_holme@hotmail.com> | 2016-03-20 11:14:58 +0000 |
commit | f046ac48d67c8597a7d6d8dff835436f9d628da2 (patch) | |
tree | 0a51f3c550e80d2308cf0fdeee5d53cda6de2de6 /lib | |
parent | 100f991251438b74bbd907780cf2db3010d1215c (diff) |
inet_pton.c: Fixed compilation warnings
warning: conversion to 'unsigned char' from 'int' may alter its value
Diffstat (limited to 'lib')
-rw-r--r-- | lib/inet_pton.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/inet_pton.c b/lib/inet_pton.c index 7d4714db7..cf8b88a1d 100644 --- a/lib/inet_pton.c +++ b/lib/inet_pton.c @@ -188,7 +188,7 @@ inet_pton6(const char *src, unsigned char *dst) } if(tp + INT16SZ > endp) return (0); - *tp++ = (unsigned char) (val >> 8) & 0xff; + *tp++ = (unsigned char) ((val >> 8) & 0xff); *tp++ = (unsigned char) (val & 0xff); saw_xdigit = 0; val = 0; @@ -205,7 +205,7 @@ inet_pton6(const char *src, unsigned char *dst) if(saw_xdigit) { if(tp + INT16SZ > endp) return (0); - *tp++ = (unsigned char) (val >> 8) & 0xff; + *tp++ = (unsigned char) ((val >> 8) & 0xff); *tp++ = (unsigned char) (val & 0xff); } if(colonp != NULL) { |