Fix compiler warnings
This commit is contained in:
parent
fae032efc9
commit
fe24ad277f
4
uri.c
4
uri.c
|
@ -141,7 +141,7 @@ uri_host_inet(PG_FUNCTION_ARGS)
|
||||||
parse_uri(s, &uri);
|
parse_uri(s, &uri);
|
||||||
if (uri.hostData.ip4)
|
if (uri.hostData.ip4)
|
||||||
{
|
{
|
||||||
unsigned char *data = uri.hostData.ip4;
|
unsigned char *data = uri.hostData.ip4->data;
|
||||||
char *tmp = palloc(16);
|
char *tmp = palloc(16);
|
||||||
snprintf(tmp, 16, "%u.%u.%u.%u", data[0], data[1], data[2], data[3]);
|
snprintf(tmp, 16, "%u.%u.%u.%u", data[0], data[1], data[2], data[3]);
|
||||||
uriFreeUriMembersA(&uri);
|
uriFreeUriMembersA(&uri);
|
||||||
|
@ -149,7 +149,7 @@ uri_host_inet(PG_FUNCTION_ARGS)
|
||||||
}
|
}
|
||||||
else if (uri.hostData.ip6)
|
else if (uri.hostData.ip6)
|
||||||
{
|
{
|
||||||
unsigned char *data = uri.hostData.ip6;
|
unsigned char *data = uri.hostData.ip6->data;
|
||||||
char *tmp = palloc(40);
|
char *tmp = palloc(40);
|
||||||
snprintf(tmp, 40, "%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x",
|
snprintf(tmp, 40, "%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x",
|
||||||
data[0], data[1], data[2], data[3],
|
data[0], data[1], data[2], data[3],
|
||||||
|
|
Loading…
Reference in New Issue