mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
Fix bug#931.
Silent a compiler warning.
This commit is contained in:
parent
7c57091f10
commit
a4fd67937c
3 changed files with 46 additions and 28 deletions
16
g10/tdbio.c
16
g10/tdbio.c
|
@ -1007,8 +1007,8 @@ drop_from_hashtable( ulong table, byte *key, int keylen, ulong recnum )
|
|||
*/
|
||||
static int
|
||||
lookup_hashtable( ulong table, const byte *key, size_t keylen,
|
||||
int (*cmpfnc)(void*, const TRUSTREC *), void *cmpdata,
|
||||
TRUSTREC *rec )
|
||||
int (*cmpfnc)(const void*, const TRUSTREC *),
|
||||
const void *cmpdata, TRUSTREC *rec )
|
||||
{
|
||||
int rc;
|
||||
ulong hashrec, item;
|
||||
|
@ -1464,10 +1464,10 @@ tdbio_new_recnum()
|
|||
|
||||
|
||||
static int
|
||||
cmp_trec_fpr ( void *fpr, const TRUSTREC *rec )
|
||||
cmp_trec_fpr (const void *fpr, const TRUSTREC *rec )
|
||||
{
|
||||
return rec->rectype == RECTYPE_TRUST
|
||||
&& !memcmp( rec->r.trust.fingerprint, fpr, 20);
|
||||
return (rec->rectype == RECTYPE_TRUST
|
||||
&& !memcmp( rec->r.trust.fingerprint, fpr, 20));
|
||||
}
|
||||
|
||||
|
||||
|
@ -1476,9 +1476,9 @@ tdbio_search_trust_byfpr( const byte *fingerprint, TRUSTREC *rec )
|
|||
{
|
||||
int rc;
|
||||
|
||||
/* locate the trust record using the hash table */
|
||||
rc = lookup_hashtable( get_trusthashrec(), fingerprint, 20,
|
||||
cmp_trec_fpr, (void*)fingerprint, rec );
|
||||
/* Locate the trust record using the hash table. */
|
||||
rc = lookup_hashtable (get_trusthashrec(), fingerprint, 20,
|
||||
cmp_trec_fpr, fingerprint, rec);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue