Revert "Changed the API for cdb_rewind() / cdb_next_item() to make the caller hold...
[citadel.git] / citadel / server / user_ops.c
index 6abb6993eb550548b179abefb4145e9095b97d51..76897347cd11f10674f7e506dba70d17dfca44ba 100644 (file)
@@ -401,8 +401,8 @@ int getuserbyuid(struct ctdluser *usbuf, uid_t number) {
        // Yes, we do this the long way.
        // No, we don't use CtdlForEachUser() because that requires multiple reads for each record
        // TODO: make an index
-       void *cur = cdb_rewind(CDB_USERS);
-       while (cdbus = cdb_next_item(cur, CDB_USERS), cdbus != NULL) {
+       cdb_rewind(CDB_USERS);
+       while (cdbus = cdb_next_item(CDB_USERS), cdbus != NULL) {
                usptr = (struct ctdluser *) cdbus->ptr;
 
                if (usptr->uid == number) {
@@ -1044,8 +1044,8 @@ void ForEachUser(void (*CallBack) (char *, void *out_data), void *in_data) {
        }
 
        // Phase 1 : build an array of all our user account names
-       void *cur = cdb_rewind(CDB_USERS);
-       while (cdbus = cdb_next_item(cur, CDB_USERS), cdbus != NULL) {
+       cdb_rewind(CDB_USERS);
+       while (cdbus = cdb_next_item(CDB_USERS), cdbus != NULL) {
                usptr = (struct ctdluser *) cdbus->ptr;
                if (strlen(usptr->fullname) > 0) {
                        array_append(all_users, usptr->fullname);