Source: nn Version: 6.7.3-14 Severity: normal Tags: patch Dear Maintainer,
>From 7385231dd6fad1c396e7bb351bcddf56e8dbd836 Mon Sep 17 00:00:00 2001 >From: Bjarni Ingi Gislason <bjarn...@rhi.hi.is> >Date: Tue, 16 Mar 2021 05:00:23 +0000 >Subject: [PATCH] hash.c: add type declarations as parameters to functions; add > a "return 1" to "hdbmtohash()" hash.c: Add a type declaration to empty parentheses. Add a "return 1" to function "hdbmtohash()"; unknown purpose! Add type declarations as parameters to the function "hashwalk()". Signed-off-by: Bjarni Ingi Gislason <bjarn...@rhi.hi.is> --- hash.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/hash.c b/hash.c index 07d0081..6a214ce 100644 --- a/hash.c +++ b/hash.c @@ -71,7 +71,7 @@ hashdef(register HASHDATUM key) #endif HASHTABLE * -hashcreate(unsigned size, unsigned (*hashfunc) ()) +hashcreate(unsigned size, unsigned (*hashfunc) (void)) /* size a crude guide to size */ { return hdbmcreate(size, hashfunc); @@ -146,7 +146,7 @@ hashdelete(HASHTABLE * tbl, register HASHDATUM key) struct translate { char *realhook; - int (*func) (); + int (*func) (char *, char *, char *); }; static int @@ -155,6 +155,7 @@ hdbmtohash(HDBMDATUM key, HDBMDATUM data, char *hook) register struct translate *thp = (struct translate *) hook; (*thp->func) (key.dat_ptr, data.dat_ptr, thp->realhook); + return 1; /* added, unknown purpose */ } /* @@ -162,8 +163,14 @@ hdbmtohash(HDBMDATUM key, HDBMDATUM data, char *hook) * HDBMDATUM arguments to HASHDATUM arguments. this also demonstrates * how to use the hook argument. */ + void - hashwalk(HASHTABLE * tbl, int (*nodefunc) (), char *hook) +/* next line changed + hashwalk(HASHTABLE * tbl, int (*nodefunc) (), char *hook) +*/ + hashwalk(HASHTABLE * tbl, int (*nodefunc) (char *, char *, + char *), char *hook) + /* hook (void *) really */ { struct translate transhook; -- 2.30.2 -- System Information: Debian Release: bullseye/sid APT prefers testing APT policy: (500, 'testing'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 5.10.19-1 (SMP w/2 CPU threads) Locale: LANG=is_IS.iso88591, LC_CTYPE=is_IS.iso88591 (charmap=ISO-8859-1), LANGUAGE not set Shell: /bin/sh linked to /bin/dash Init: sysvinit (via /sbin/init) -- debconf information excluded -- Bjarni I. Gislason