Skip to content

Commit e43094b

Browse files
committed
Fix compile warning.
1 parent e02f818 commit e43094b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/backend/utils/adt/network.c

Lines changed: 2 additions & 3 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-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/network.c,v 1.39 2003/03/21 21:54:29 momjian Exp $
6+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/network.c,v 1.40 2003/03/21 23:18:52 tgl Exp $
77
*
88
* Jon Postel RIP 16 Oct 1998
99
*/
@@ -611,9 +611,8 @@ network_hostmask(PG_FUNCTION_ARGS)
611611
inet *ip = PG_GETARG_INET_P(0);
612612
inet *dst;
613613

614-
dst = (inet *) palloc(VARHDRSZ + sizeof(inet_struct));
615614
/* make sure any unused bits are zeroed */
616-
MemSet(dst, 0, VARHDRSZ + sizeof(inet_struct));
615+
dst = (inet *) palloc0(VARHDRSZ + sizeof(inet_struct));
617616

618617
if (ip_family(ip) == AF_INET)
619618
{

src/include/utils/builtins.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Id: builtins.h,v 1.209 2003/03/20 18:58:02 momjian Exp $
10+
* $Id: builtins.h,v 1.210 2003/03/21 23:18:51 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -568,6 +568,7 @@ extern Datum network_sup(PG_FUNCTION_ARGS);
568568
extern Datum network_supeq(PG_FUNCTION_ARGS);
569569
extern Datum network_network(PG_FUNCTION_ARGS);
570570
extern Datum network_netmask(PG_FUNCTION_ARGS);
571+
extern Datum network_hostmask(PG_FUNCTION_ARGS);
571572
extern Datum network_masklen(PG_FUNCTION_ARGS);
572573
extern Datum network_broadcast(PG_FUNCTION_ARGS);
573574
extern Datum network_host(PG_FUNCTION_ARGS);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy