From: Tom Lane Date: Fri, 21 Mar 2003 23:18:52 +0000 (+0000) Subject: Fix compile warning. X-Git-Tag: REL7_4_BETA1~859 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e43094b1249a0e2814d0759d545ccfe786baef3d;p=postgresql Fix compile warning. --- diff --git a/src/backend/utils/adt/network.c b/src/backend/utils/adt/network.c index 92229d3818..d814f96731 100644 --- a/src/backend/utils/adt/network.c +++ b/src/backend/utils/adt/network.c @@ -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) { diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h index 3a2b20eacb..1b22e9389b 100644 --- a/src/include/utils/builtins.h +++ b/src/include/utils/builtins.h @@ -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);