mirror of
https://github.com/postgres/postgres.git
synced 2025-05-21 15:54:08 +03:00
Fix for inet_net_pton() from Tom.
This commit is contained in:
parent
e48623ce87
commit
377b5fa3a4
@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
static const char rcsid[] = "$Id: inet_net_pton.c,v 1.2 1998/10/04 15:35:09 momjian Exp $";
|
static const char rcsid[] = "$Id: inet_net_pton.c,v 1.3 1998/10/12 01:30:26 momjian Exp $";
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -117,7 +117,7 @@ inet_net_pton_ipv4(const char *src, u_char *dst, size_t size)
|
|||||||
*dst |= n;
|
*dst |= n;
|
||||||
if (!dirty++)
|
if (!dirty++)
|
||||||
*dst <<= 4;
|
*dst <<= 4;
|
||||||
else if (size-- > 0)
|
else if (--size > 0)
|
||||||
*++dst = 0, dirty = 0;
|
*++dst = 0, dirty = 0;
|
||||||
else
|
else
|
||||||
goto emsgsize;
|
goto emsgsize;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user