mirror of
https://github.com/postgres/postgres.git
synced 2025-11-19 13:42:17 +03:00
Remove unnecessary parentheses in return statements
The parenthesized style has only been used in a few modules. Change that to use the style that is predominant across the whole tree. Reviewed-by: Michael Paquier <michael.paquier@gmail.com> Reviewed-by: Ryan Murphy <ryanfmurphy@gmail.com>
This commit is contained in:
@@ -58,12 +58,12 @@ inet_cidr_ntop(int af, const void *src, int bits, char *dst, size_t size)
|
||||
switch (af)
|
||||
{
|
||||
case PGSQL_AF_INET:
|
||||
return (inet_cidr_ntop_ipv4(src, bits, dst, size));
|
||||
return inet_cidr_ntop_ipv4(src, bits, dst, size);
|
||||
case PGSQL_AF_INET6:
|
||||
return (inet_cidr_ntop_ipv6(src, bits, dst, size));
|
||||
return inet_cidr_ntop_ipv6(src, bits, dst, size);
|
||||
default:
|
||||
errno = EAFNOSUPPORT;
|
||||
return (NULL);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ inet_cidr_ntop_ipv4(const u_char *src, int bits, char *dst, size_t size)
|
||||
if (bits < 0 || bits > 32)
|
||||
{
|
||||
errno = EINVAL;
|
||||
return (NULL);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (bits == 0)
|
||||
@@ -137,11 +137,11 @@ inet_cidr_ntop_ipv4(const u_char *src, int bits, char *dst, size_t size)
|
||||
if (size <= sizeof "/32")
|
||||
goto emsgsize;
|
||||
dst += SPRINTF((dst, "/%u", bits));
|
||||
return (odst);
|
||||
return odst;
|
||||
|
||||
emsgsize:
|
||||
errno = EMSGSIZE;
|
||||
return (NULL);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -182,7 +182,7 @@ inet_cidr_ntop_ipv6(const u_char *src, int bits, char *dst, size_t size)
|
||||
if (bits < 0 || bits > 128)
|
||||
{
|
||||
errno = EINVAL;
|
||||
return (NULL);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
cp = outbuf;
|
||||
@@ -286,9 +286,9 @@ inet_cidr_ntop_ipv6(const u_char *src, int bits, char *dst, size_t size)
|
||||
goto emsgsize;
|
||||
strcpy(dst, outbuf);
|
||||
|
||||
return (dst);
|
||||
return dst;
|
||||
|
||||
emsgsize:
|
||||
errno = EMSGSIZE;
|
||||
return (NULL);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user