X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=x2p%2Fhash.c;h=dbdc92842414983050528933c26b43ff1146e509;hb=c63dfae1e0dd3ff2a89e180471b2ec48a0f2dec6;hp=a2a4f6b941720d36a474ae1a4cbcb0b8ab02743a;hpb=45ac9ec52cacc64288cd4550b4d33e455b35ab9d;p=p5sagit%2Fp5-mst-13.2.git diff --git a/x2p/hash.c b/x2p/hash.c index a2a4f6b..dbdc928 100644 --- a/x2p/hash.c +++ b/x2p/hash.c @@ -1,6 +1,6 @@ /* $RCSfile: hash.c,v $$Revision: 4.1 $$Date: 92/08/07 18:29:20 $ * - * Copyright (c) 1991-2001, Larry Wall + * Copyright (c) 1991-2002, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -13,6 +13,10 @@ #include "a2p.h" #include "util.h" +#ifdef NETWARE +char *savestr(char *str); +#endif + STR * hfetch(register HASH *tb, char *key) { @@ -137,7 +141,7 @@ hsplit(HASH *tb) register HENT **oentry; a = (HENT**) saferealloc((char*)tb->tbl_array, newsize * sizeof(HENT*)); - Zero(&a[oldsize], oldsize, HENT*); /* zero second half */ + memset(&a[oldsize], 0, oldsize * sizeof(HENT*)); /* zero second half */ tb->tbl_max = --newsize; tb->tbl_array = a; @@ -171,7 +175,7 @@ hnew(void) tb->tbl_fill = 0; tb->tbl_max = 7; hiterinit(tb); /* so each() will start off right */ - Zero(tb->tbl_array, 8, sizeof(HENT*)); + memset(tb->tbl_array, 0, 8 * sizeof(HENT*)); return tb; }