]> arthur.barton.de Git - netatalk.git/blob - libatalk/cnid/cnid_nextid.c
Clean up code with astyle.
[netatalk.git] / libatalk / cnid / cnid_nextid.c
1 /*
2  * $Id: cnid_nextid.c,v 1.6.2.1 2001-12-03 05:05:48 jmarcus Exp $
3  */
4 #ifdef unused
5
6 #ifdef HAVE_CONFIG_H
7 #include "config.h"
8 #endif /* HAVE_CONFIG_H */
9
10 #ifdef CNID_DB
11 #include <db.h>
12
13 #include <atalk/adouble.h>
14 #include <atalk/cnid.h>
15
16 #include <syslog.h>
17
18 #include "cnid_private.h"
19
20 /* return the next id. we use the fact that ad files are memory
21  * mapped. */
22 cnid_t cnid_nextid(void *CNID)
23 {
24     CNID_private *db;
25     cnid_t id;
26
27     if (!(db = CNID))
28         return 0;
29
30     memcpy(&id, ad_entry(&db->rootinfo, ADEID_DID), sizeof(id));
31     return id;
32 }
33 #endif /* CNID_DB */
34 #endif
35