diff options
author | Bruce Momjian <bruce@momjian.us> | 1999-05-25 16:15:34 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 1999-05-25 16:15:34 +0000 |
commit | 07842084fe3e11041f83563c851236395f481470 (patch) | |
tree | ab9960e67325bec5a97b8b4dd4b2075ce60cc420 /src/backend/utils/adt/inet_net_ntop.c | |
parent | 4b04b01aaa460f1e52980f24173dc7a4535efd2d (diff) | |
download | postgresql-07842084fe3e11041f83563c851236395f481470.tar.gz postgresql-07842084fe3e11041f83563c851236395f481470.zip |
pgindent run over code.
Diffstat (limited to 'src/backend/utils/adt/inet_net_ntop.c')
-rw-r--r-- | src/backend/utils/adt/inet_net_ntop.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/backend/utils/adt/inet_net_ntop.c b/src/backend/utils/adt/inet_net_ntop.c index 8c185dc83ca..11a0cb9363a 100644 --- a/src/backend/utils/adt/inet_net_ntop.c +++ b/src/backend/utils/adt/inet_net_ntop.c @@ -16,7 +16,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: inet_net_ntop.c,v 1.5 1999/05/25 05:29:38 momjian Exp $"; +static const char rcsid[] = "$Id: inet_net_ntop.c,v 1.6 1999/05/25 16:12:04 momjian Exp $"; #endif @@ -40,9 +40,9 @@ static const char rcsid[] = "$Id: inet_net_ntop.c,v 1.5 1999/05/25 05:29:38 momj #endif static char *inet_net_ntop_ipv4(const u_char *src, int bits, - char *dst, size_t size); + char *dst, size_t size); static char *inet_cidr_ntop_ipv4(const u_char *src, int bits, - char *dst, size_t size); + char *dst, size_t size); /* * char * @@ -59,7 +59,7 @@ inet_cidr_ntop(int af, const void *src, int bits, char *dst, size_t size) { switch (af) { - case AF_INET: + case AF_INET: return (inet_cidr_ntop_ipv4(src, bits, dst, size)); default: errno = EAFNOSUPPORT; @@ -162,7 +162,7 @@ inet_net_ntop(int af, const void *src, int bits, char *dst, size_t size) { switch (af) { - case AF_INET: + case AF_INET: return (inet_net_ntop_ipv4(src, bits, dst, size)); default: errno = EAFNOSUPPORT; @@ -186,10 +186,11 @@ inet_net_ntop(int af, const void *src, int bits, char *dst, size_t size) static char * inet_net_ntop_ipv4(const u_char *src, int bits, char *dst, size_t size) { - char *odst = dst; - char *t; - size_t len = 4; - int b, tb; + char *odst = dst; + char *t; + size_t len = 4; + int b, + tb; if (bits < 0 || bits > 32) { @@ -218,7 +219,7 @@ inet_net_ntop_ipv4(const u_char *src, int bits, char *dst, size_t size) *dst++ = '.'; *dst = '\0'; } - size -= (size_t)(dst - t); + size -= (size_t) (dst - t); } /* don't print masklen if 32 bits */ @@ -232,7 +233,7 @@ inet_net_ntop_ipv4(const u_char *src, int bits, char *dst, size_t size) return (odst); - emsgsize: +emsgsize: errno = EMSGSIZE; return (NULL); } |