s3:dbwrap: move all .c and .h files of dbwrap to lib/dbwrap/
[ira/wip.git] / source3 / locking / locking.c
index e0a3b93ce785132c46461c9857a4f9f878deba29..ded86c52764991db90b4c2da6a31c4763a084cf2 100644 (file)
@@ -39,7 +39,8 @@
 #include "system/filesys.h"
 #include "locking/proto.h"
 #include "smbd/globals.h"
-#include "dbwrap.h"
+#include "dbwrap/dbwrap.h"
+#include "dbwrap/dbwrap_open.h"
 #include "../libcli/security/security.h"
 #include "serverid.h"
 #include "messages.h"
@@ -1009,7 +1010,7 @@ struct share_mode_lock *fetch_share_mode_unlocked(TALLOC_CTX *mem_ctx,
                return NULL;
        }
 
-       if (lock_db->fetch(lock_db, lck, key, &data) == -1) {
+       if (lock_db->fetch(lock_db, lck, key, &data) != 0) {
                DEBUG(3, ("Could not fetch share entry\n"));
                TALLOC_FREE(lck);
                return NULL;