]> granicus.if.org Git - postgresql/commitdiff
Fix compile warning.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 21 Mar 2003 23:18:52 +0000 (23:18 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 21 Mar 2003 23:18:52 +0000 (23:18 +0000)
src/backend/utils/adt/network.c
src/include/utils/builtins.h

index 92229d38186d0eb797bc062b0e5d59b034c977de..d814f96731d7b50599a59870c0f1ba1c84e37935 100644 (file)
@@ -3,7 +3,7 @@
  *     is for IP V4 CIDR notation, but prepared for V6: just
  *     add the necessary bits where the comments indicate.
  *
- *     $Header: /cvsroot/pgsql/src/backend/utils/adt/network.c,v 1.39 2003/03/21 21:54:29 momjian Exp $
+ *     $Header: /cvsroot/pgsql/src/backend/utils/adt/network.c,v 1.40 2003/03/21 23:18:52 tgl Exp $
  *
  *     Jon Postel RIP 16 Oct 1998
  */
@@ -611,9 +611,8 @@ network_hostmask(PG_FUNCTION_ARGS)
        inet       *ip = PG_GETARG_INET_P(0);
        inet       *dst;
 
-       dst = (inet *) palloc(VARHDRSZ + sizeof(inet_struct));
        /* make sure any unused bits are zeroed */
-       MemSet(dst, 0, VARHDRSZ + sizeof(inet_struct));
+       dst = (inet *) palloc0(VARHDRSZ + sizeof(inet_struct));
 
        if (ip_family(ip) == AF_INET)
        {
index 3a2b20eacbd3c6225f0ceaf4d91827ba2cbab208..1b22e9389bb727e57612953b4385eee96efd5820 100644 (file)
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $Id: builtins.h,v 1.209 2003/03/20 18:58:02 momjian Exp $
+ * $Id: builtins.h,v 1.210 2003/03/21 23:18:51 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -568,6 +568,7 @@ extern Datum network_sup(PG_FUNCTION_ARGS);
 extern Datum network_supeq(PG_FUNCTION_ARGS);
 extern Datum network_network(PG_FUNCTION_ARGS);
 extern Datum network_netmask(PG_FUNCTION_ARGS);
+extern Datum network_hostmask(PG_FUNCTION_ARGS);
 extern Datum network_masklen(PG_FUNCTION_ARGS);
 extern Datum network_broadcast(PG_FUNCTION_ARGS);
 extern Datum network_host(PG_FUNCTION_ARGS);