mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
inet_pton.c: Fixed compilation warnings
warning: conversion to 'unsigned char' from 'int' may alter its value
This commit is contained in:
parent
100f991251
commit
f046ac48d6
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user