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

Commitad177f1

Browse files
committed
Source code cleanup.
1 parente7a9ccd commitad177f1

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

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

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
*PostgreSQL type definitions for the INET and CIDR types.
33
*
4-
*$PostgreSQL: pgsql/src/backend/utils/adt/network.c,v 1.62 2006/01/26 18:08:10 tgl Exp $
4+
*$PostgreSQL: pgsql/src/backend/utils/adt/network.c,v 1.63 2006/02/07 17:04:04 momjian Exp $
55
*
66
*Jon Postel RIP 16 Oct 1998
77
*/
@@ -104,9 +104,9 @@ network_in(char *src, bool is_cidr)
104104
errdetail("Value has bits set to right of mask.")));
105105
}
106106

107-
VARATT_SIZEP(dst)=VARHDRSZ
108-
+((char*)ip_addr(dst)- (char*)VARDATA(dst))
109-
+ip_addrsize(dst);
107+
VARATT_SIZEP(dst)=VARHDRSZ+
108+
((char*)ip_addr(dst)- (char*)VARDATA(dst))+
109+
ip_addrsize(dst);
110110
ip_bits(dst)=bits;
111111

112112
returndst;
@@ -219,9 +219,9 @@ network_recv(StringInfo buf, bool is_cidr)
219219
/* translator: %s is inet or cidr */
220220
errmsg("invalid length in external \"%s\" value",
221221
is_cidr ?"cidr" :"inet")));
222-
VARATT_SIZEP(addr)=VARHDRSZ
223-
+((char*)ip_addr(addr)- (char*)VARDATA(addr))
224-
+ip_addrsize(addr);
222+
VARATT_SIZEP(addr)=VARHDRSZ+
223+
((char*)ip_addr(addr)- (char*)VARDATA(addr))+
224+
ip_addrsize(addr);
225225

226226
addrptr= (char*)ip_addr(addr);
227227
for (i=0;i<nb;i++)
@@ -792,9 +792,9 @@ network_broadcast(PG_FUNCTION_ARGS)
792792

793793
ip_family(dst)=ip_family(ip);
794794
ip_bits(dst)=ip_bits(ip);
795-
VARATT_SIZEP(dst)=VARHDRSZ
796-
+((char*)ip_addr(dst)- (char*)VARDATA(dst))
797-
+ip_addrsize(dst);
795+
VARATT_SIZEP(dst)=VARHDRSZ+
796+
((char*)ip_addr(dst)- (char*)VARDATA(dst))+
797+
ip_addrsize(dst);
798798

799799
PG_RETURN_INET_P(dst);
800800
}
@@ -837,9 +837,9 @@ network_network(PG_FUNCTION_ARGS)
837837

838838
ip_family(dst)=ip_family(ip);
839839
ip_bits(dst)=ip_bits(ip);
840-
VARATT_SIZEP(dst)=VARHDRSZ
841-
+((char*)ip_addr(dst)- (char*)VARDATA(dst))
842-
+ip_addrsize(dst);
840+
VARATT_SIZEP(dst)=VARHDRSZ+
841+
((char*)ip_addr(dst)- (char*)VARDATA(dst))+
842+
ip_addrsize(dst);
843843

844844
PG_RETURN_INET_P(dst);
845845
}
@@ -880,9 +880,9 @@ network_netmask(PG_FUNCTION_ARGS)
880880

881881
ip_family(dst)=ip_family(ip);
882882
ip_bits(dst)=ip_maxbits(ip);
883-
VARATT_SIZEP(dst)=VARHDRSZ
884-
+((char*)ip_addr(dst)- (char*)VARDATA(dst))
885-
+ip_addrsize(dst);
883+
VARATT_SIZEP(dst)=VARHDRSZ+
884+
((char*)ip_addr(dst)- (char*)VARDATA(dst))+
885+
ip_addrsize(dst);
886886

887887
PG_RETURN_INET_P(dst);
888888
}
@@ -929,9 +929,9 @@ network_hostmask(PG_FUNCTION_ARGS)
929929

930930
ip_family(dst)=ip_family(ip);
931931
ip_bits(dst)=ip_maxbits(ip);
932-
VARATT_SIZEP(dst)=VARHDRSZ
933-
+((char*)ip_addr(dst)- (char*)VARDATA(dst))
934-
+ip_addrsize(dst);
932+
VARATT_SIZEP(dst)=VARHDRSZ+
933+
((char*)ip_addr(dst)- (char*)VARDATA(dst))+
934+
ip_addrsize(dst);
935935

936936
PG_RETURN_INET_P(dst);
937937
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp