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

Commit9e38dcf

Browse files
committed
Re-fix test for negative-integer return code that should be
testing for null-pointer return code...
1 parent374d9a1 commit9e38dcf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*is for IP V4 CIDR notation, but prepared for V6: just
44
*add the necessary bits where the comments indicate.
55
*
6-
*$Id: network.c,v 1.3 1998/10/2904:41:44 momjian Exp $
6+
*$Id: network.c,v 1.4 1998/10/2916:13:07 tgl Exp $
77
*Jon Postel RIP 16 Oct 1998
88
*/
99

@@ -397,7 +397,7 @@ network_network(inet *ip)
397397
/* It's an IP V4 address: */
398398
intaddr=htonl(ntohl(ip_v4addr(ip))& (0xffffffff << (32-ip_bits(ip))));
399399

400-
if (inet_cidr_ntop(AF_INET,&addr,ip_bits(ip),tmp,sizeof(tmp))<0)
400+
if (inet_cidr_ntop(AF_INET,&addr,ip_bits(ip),tmp,sizeof(tmp))==NULL)
401401
{
402402
elog(ERROR,"unable to print network (%s)",strerror(errno));
403403
return (NULL);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp