/*
* PostgreSQL type definitions for the INET and CIDR types.
*
- * $PostgreSQL: pgsql/src/backend/utils/adt/network.c,v 1.62 2006/01/26 18:08:10 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/network.c,v 1.63 2006/02/07 17:04:04 momjian Exp $
*
* Jon Postel RIP 16 Oct 1998
*/
errdetail("Value has bits set to right of mask.")));
}
- VARATT_SIZEP(dst) = VARHDRSZ
- + ((char *) ip_addr(dst) - (char *) VARDATA(dst))
- + ip_addrsize(dst);
+ VARATT_SIZEP(dst) = VARHDRSZ +
+ ((char *) ip_addr(dst) - (char *) VARDATA(dst)) +
+ ip_addrsize(dst);
ip_bits(dst) = bits;
return dst;
/* translator: %s is inet or cidr */
errmsg("invalid length in external \"%s\" value",
is_cidr ? "cidr" : "inet")));
- VARATT_SIZEP(addr) = VARHDRSZ
- + ((char *) ip_addr(addr) - (char *) VARDATA(addr))
- + ip_addrsize(addr);
+ VARATT_SIZEP(addr) = VARHDRSZ +
+ ((char *) ip_addr(addr) - (char *) VARDATA(addr)) +
+ ip_addrsize(addr);
addrptr = (char *) ip_addr(addr);
for (i = 0; i < nb; i++)
ip_family(dst) = ip_family(ip);
ip_bits(dst) = ip_bits(ip);
- VARATT_SIZEP(dst) = VARHDRSZ
- + ((char *) ip_addr(dst) - (char *) VARDATA(dst))
- + ip_addrsize(dst);
+ VARATT_SIZEP(dst) = VARHDRSZ +
+ ((char *) ip_addr(dst) - (char *) VARDATA(dst)) +
+ ip_addrsize(dst);
PG_RETURN_INET_P(dst);
}
ip_family(dst) = ip_family(ip);
ip_bits(dst) = ip_bits(ip);
- VARATT_SIZEP(dst) = VARHDRSZ
- + ((char *) ip_addr(dst) - (char *) VARDATA(dst))
- + ip_addrsize(dst);
+ VARATT_SIZEP(dst) = VARHDRSZ +
+ ((char *) ip_addr(dst) - (char *) VARDATA(dst)) +
+ ip_addrsize(dst);
PG_RETURN_INET_P(dst);
}
ip_family(dst) = ip_family(ip);
ip_bits(dst) = ip_maxbits(ip);
- VARATT_SIZEP(dst) = VARHDRSZ
- + ((char *) ip_addr(dst) - (char *) VARDATA(dst))
- + ip_addrsize(dst);
+ VARATT_SIZEP(dst) = VARHDRSZ +
+ ((char *) ip_addr(dst) - (char *) VARDATA(dst)) +
+ ip_addrsize(dst);
PG_RETURN_INET_P(dst);
}
ip_family(dst) = ip_family(ip);
ip_bits(dst) = ip_maxbits(ip);
- VARATT_SIZEP(dst) = VARHDRSZ
- + ((char *) ip_addr(dst) - (char *) VARDATA(dst))
- + ip_addrsize(dst);
+ VARATT_SIZEP(dst) = VARHDRSZ +
+ ((char *) ip_addr(dst) - (char *) VARDATA(dst)) +
+ ip_addrsize(dst);
PG_RETURN_INET_P(dst);
}