s4:ntptr/ntptr_simple_ldb.c - use LDB result constants
authorMatthias Dieter Wallnöfer <mdw@samba.org>
Thu, 14 Oct 2010 20:38:10 +0000 (22:38 +0200)
committerMatthias Dieter Wallnöfer <mdw@samba.org>
Fri, 15 Oct 2010 06:45:15 +0000 (08:45 +0200)
source4/ntptr/simple_ldb/ntptr_simple_ldb.c

index 755c1baa7ebd56e67b4a75d0a32b756ffeae987a..2790f8359d613aee8f53eadf4d9449e887cda804 100644 (file)
@@ -74,13 +74,13 @@ static int sptr_db_search(struct ldb_context *ldb,
 
 #define SET_STRING(ldb, mod, attr, value) do { \
        if (value == NULL) return WERR_INVALID_PARAM; \
-       if (samdb_msg_add_string(ldb, (TALLOC_CTX *)mod, mod, attr, value) != 0) { \
+       if (samdb_msg_add_string(ldb, (TALLOC_CTX *)mod, mod, attr, value) != LDB_SUCCESS) { \
                return WERR_NOMEM; \
        } \
 } while (0)
 
 #define SET_UINT(ldb, mod, attr, value) do { \
-       if (samdb_msg_add_uint(ldb, (TALLOC_CTX *)mod, mod, attr, value) != 0) { \
+       if (samdb_msg_add_uint(ldb, (TALLOC_CTX *)mod, mod, attr, value) != LDB_SUCCESS) { \
                return WERR_NOMEM; \
        } \
 } while (0)