summaryrefslogtreecommitdiffstats
path: root/crypto/txt_db
diff options
context:
space:
mode:
authorBen Laurie <ben@openssl.org>2005-03-31 11:26:39 +0200
committerBen Laurie <ben@openssl.org>2005-03-31 11:26:39 +0200
commit41a15c4f0f2535591ba9f258cf76119f86477c43 (patch)
tree6aca3f255f97dc3e9bd18884beeddf7de26fa122 /crypto/txt_db
parentfix header (diff)
downloadopenssl-41a15c4f0f2535591ba9f258cf76119f86477c43.tar.xz
openssl-41a15c4f0f2535591ba9f258cf76119f86477c43.zip
Give everything prototypes (well, everything that's actually used).
Diffstat (limited to 'crypto/txt_db')
-rw-r--r--crypto/txt_db/txt_db.c10
-rw-r--r--crypto/txt_db/txt_db.h4
2 files changed, 7 insertions, 7 deletions
diff --git a/crypto/txt_db/txt_db.c b/crypto/txt_db/txt_db.c
index 58b300b00b..b3a7a42ca0 100644
--- a/crypto/txt_db/txt_db.c
+++ b/crypto/txt_db/txt_db.c
@@ -92,7 +92,7 @@ TXT_DB *TXT_DB_read(BIO *in, int num)
goto err;
if ((ret->index=(LHASH **)OPENSSL_malloc(sizeof(LHASH *)*num)) == NULL)
goto err;
- if ((ret->qual=(int (**)())OPENSSL_malloc(sizeof(int (**)())*num)) == NULL)
+ if ((ret->qual=(int (**)(char **))OPENSSL_malloc(sizeof(int (**)(char **))*num)) == NULL)
goto err;
for (i=0; i<num; i++)
{
@@ -210,11 +210,11 @@ char **TXT_DB_get_by_index(TXT_DB *db, int idx, char **value)
return(ret);
}
-int TXT_DB_create_index(TXT_DB *db, int field, int (*qual)(),
+int TXT_DB_create_index(TXT_DB *db, int field, int (*qual)(char **),
LHASH_HASH_FN_TYPE hash, LHASH_COMP_FN_TYPE cmp)
{
LHASH *idx;
- char *r;
+ char **r;
int i,n;
if (field >= db->num_fields)
@@ -230,12 +230,12 @@ int TXT_DB_create_index(TXT_DB *db, int field, int (*qual)(),
n=sk_num(db->data);
for (i=0; i<n; i++)
{
- r=(char *)sk_value(db->data,i);
+ r=(char **)sk_value(db->data,i);
if ((qual != NULL) && (qual(r) == 0)) continue;
if ((r=lh_insert(idx,r)) != NULL)
{
db->error=DB_ERROR_INDEX_CLASH;
- db->arg1=sk_find(db->data,r);
+ db->arg1=sk_find(db->data,(char *)r);
db->arg2=i;
lh_free(idx);
return(0);
diff --git a/crypto/txt_db/txt_db.h b/crypto/txt_db/txt_db.h
index c98e287703..307e1ba23f 100644
--- a/crypto/txt_db/txt_db.h
+++ b/crypto/txt_db/txt_db.h
@@ -82,7 +82,7 @@ typedef struct txt_db_st
int num_fields;
STACK /* char ** */ *data;
LHASH **index;
- int (**qual)();
+ int (**qual)(char **);
long error;
long arg1;
long arg2;
@@ -96,7 +96,7 @@ long TXT_DB_write(BIO *out, TXT_DB *db);
TXT_DB *TXT_DB_read(char *in, int num);
long TXT_DB_write(char *out, TXT_DB *db);
#endif
-int TXT_DB_create_index(TXT_DB *db,int field,int (*qual)(),
+int TXT_DB_create_index(TXT_DB *db,int field,int (*qual)(char **),
LHASH_HASH_FN_TYPE hash, LHASH_COMP_FN_TYPE cmp);
void TXT_DB_free(TXT_DB *db);
char **TXT_DB_get_by_index(TXT_DB *db, int idx, char **value);