1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-07 00:36:50 +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:
Peter Eisentraut
2017-08-17 12:39:20 -04:00
parent ba26f5cf76
commit 17273d059c
99 changed files with 469 additions and 469 deletions

View File

@ -73,7 +73,7 @@ inet_net_pton(int af, const char *src, void *dst, size_t size)
inet_cidr_pton_ipv6(src, dst, size);
default:
errno = EAFNOSUPPORT;
return (-1);
return -1;
}
}
@ -228,15 +228,15 @@ inet_cidr_pton_ipv4(const char *src, u_char *dst, size_t size)
goto emsgsize;
*dst++ = '\0';
}
return (bits);
return bits;
enoent:
errno = ENOENT;
return (-1);
return -1;
emsgsize:
errno = EMSGSIZE;
return (-1);
return -1;
}
/*
@ -338,11 +338,11 @@ inet_net_pton_ipv4(const char *src, u_char *dst)
enoent:
errno = ENOENT;
return (-1);
return -1;
emsgsize:
errno = EMSGSIZE;
return (-1);
return -1;
}
static int
@ -363,19 +363,19 @@ getbits(const char *src, int *bitsp)
if (pch != NULL)
{
if (n++ != 0 && val == 0) /* no leading zeros */
return (0);
return 0;
val *= 10;
val += (pch - digits);
if (val > 128) /* range */
return (0);
return 0;
continue;
}
return (0);
return 0;
}
if (n == 0)
return (0);
return 0;
*bitsp = val;
return (1);
return 1;
}
static int
@ -397,32 +397,32 @@ getv4(const char *src, u_char *dst, int *bitsp)
if (pch != NULL)
{
if (n++ != 0 && val == 0) /* no leading zeros */
return (0);
return 0;
val *= 10;
val += (pch - digits);
if (val > 255) /* range */
return (0);
return 0;
continue;
}
if (ch == '.' || ch == '/')
{
if (dst - odst > 3) /* too many octets? */
return (0);
return 0;
*dst++ = val;
if (ch == '/')
return (getbits(src, bitsp));
return getbits(src, bitsp);
val = 0;
n = 0;
continue;
}
return (0);
return 0;
}
if (n == 0)
return (0);
return 0;
if (dst - odst > 3) /* too many octets? */
return (0);
return 0;
*dst++ = val;
return (1);
return 1;
}
static int
@ -552,13 +552,13 @@ inet_cidr_pton_ipv6(const char *src, u_char *dst, size_t size)
*/
memcpy(dst, tmp, NS_IN6ADDRSZ);
return (bits);
return bits;
enoent:
errno = ENOENT;
return (-1);
return -1;
emsgsize:
errno = EMSGSIZE;
return (-1);
return -1;
}