1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -05:00

inet_pton.c: Fixed compilation warnings

warning: conversion to 'unsigned char' from 'int' may alter its value
This commit is contained in:
Steve Holme 2016-03-20 11:14:58 +00:00
parent 100f991251
commit f046ac48d6

View File

@ -188,7 +188,7 @@ inet_pton6(const char *src, unsigned char *dst)
} }
if(tp + INT16SZ > endp) if(tp + INT16SZ > endp)
return (0); return (0);
*tp++ = (unsigned char) (val >> 8) & 0xff; *tp++ = (unsigned char) ((val >> 8) & 0xff);
*tp++ = (unsigned char) (val & 0xff); *tp++ = (unsigned char) (val & 0xff);
saw_xdigit = 0; saw_xdigit = 0;
val = 0; val = 0;
@ -205,7 +205,7 @@ inet_pton6(const char *src, unsigned char *dst)
if(saw_xdigit) { if(saw_xdigit) {
if(tp + INT16SZ > endp) if(tp + INT16SZ > endp)
return (0); return (0);
*tp++ = (unsigned char) (val >> 8) & 0xff; *tp++ = (unsigned char) ((val >> 8) & 0xff);
*tp++ = (unsigned char) (val & 0xff); *tp++ = (unsigned char) (val & 0xff);
} }
if(colonp != NULL) { if(colonp != NULL) {