mirror of
https://github.com/curl/curl.git
synced 2024-11-21 01:16:58 +08: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)
|
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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user