/****************************************************************************
- * Copyright (c) 2006-2008,2011 Free Software Foundation, Inc. *
+ * Copyright (c) 2006-2013,2019 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
#if USE_HASHED_DB
-MODULE_ID("$Id: hashed_db.c,v 1.15 2011/08/13 21:08:08 tom Exp $")
+MODULE_ID("$Id: hashed_db.c,v 1.18 2019/01/21 17:34:49 tom Exp $")
#if HASHED_DB_API >= 2
static DBC *cursor;
if (p->path != 0) {
p->next = connections;
connections = p;
+ } else {
+ free(p);
}
}
}
result = -1;
}
#else
- result = db->seq(db, key, data, 0);
+ result = db->seq(db, key, data, R_NEXT);
#endif
return result;
}
_nc_db_have_index(DBT * key, DBT * data, char **buffer, int *size)
{
bool result = FALSE;
- int used = data->size - 1;
+ int used = (int) data->size - 1;
char *have = (char *) data->data;
(void) key;
_nc_db_have_data(DBT * key, DBT * data, char **buffer, int *size)
{
bool result = FALSE;
- int used = data->size - 1;
+ int used = (int) data->size - 1;
char *have = (char *) data->data;
if (*have++ == 0) {