1/* 2 */ 3 4#ifdef HAVE_CONFIG_H 5#include "config.h" 6#endif /* HAVE_CONFIG_H */ 7 8#ifdef CNID_BACKEND_CDB 9 10#ifdef unused 11#include "cnid_cdb_private.h" 12 13/* return the next id. we use the fact that ad files are memory 14 * mapped. */ 15cnid_t cnid_cdb_nextid(struct _cnid_db *cdb) 16{ 17 CNID_private *db; 18 cnid_t id; 19 20 if (!cdb || !(db = cdb->_private)) 21 return 0; 22 23 memcpy(&id, ad_entry(&db->rootinfo, ADEID_DID), sizeof(id)); 24 return id; 25} 26#endif 27 28#endif /* CNID_BACKEND_CDB */ 29