Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6bf0db7

Browse files
committed
FIx for 0.0.0.0/0 output as 00/0.
1 parent9432b6d commit6bf0db7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/backend/utils/adt/inet_net_ntop.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717

1818
#if defined(LIBC_SCCS)&& !defined(lint)
19-
staticconstcharrcsid[]="$Id: inet_net_ntop.c,v 1.4 1999/01/01 04:17:13 momjian Exp $";
19+
staticconstcharrcsid[]="$Id: inet_net_ntop.c,v 1.5 1999/05/25 05:29:38 momjian Exp $";
2020

2121
#endif
2222

@@ -207,7 +207,7 @@ inet_net_ntop_ipv4(const u_char *src, int bits, char *dst, size_t size)
207207

208208
/* Format whole octets plus nonzero trailing octets. */
209209
tb= (bits==32) ?31 :bits;
210-
for (b=0;b <= (tb /8)|| (b<len&&*src!=0);b++)
210+
for (b=0;bits!=0&& (b <= (tb /8)|| (b<len&&*src!=0));b++)
211211
{
212212
if (size<sizeof"255.")
213213
gotoemsgsize;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp