r955: Update debian package rules... builds now
[sfrench/samba-autobuild/.git] / source4 / lib / registry / common / reg_interface.c
index 6acedb3591c155ad3434763f83d6ef4ab5a7b747..6ad7ee69cb618fe5b5ea515b0bff9139760ac1e5 100644 (file)
@@ -64,8 +64,12 @@ static struct reg_init_function_entry *reg_find_backend_entry(const char *name)
 
        if(reg_first_init) {
                status = register_subsystem("registry", registry_register);
-               if (!NT_STATUS_IS_OK(status)) 
+               if (NT_STATUS_IS_ERR(status)) {
+                       DEBUG(0, ("Error registering registry subsystem: %s\n", nt_errstr(status)));
+                       /* Don't try the initialisation again */
+                       reg_first_init = False;
                        return NULL;
+               }
 
                static_init_registry;
                reg_first_init = False;
@@ -83,7 +87,7 @@ static struct reg_init_function_entry *reg_find_backend_entry(const char *name)
 
 BOOL reg_has_backend(const char *backend)
 {
-       return reg_find_backend_entry(backend)?True:False;
+       return reg_find_backend_entry(backend) != NULL?True:False;
 }
 
 /* Open a registry file/host/etc */
@@ -508,7 +512,7 @@ WERROR reg_key_add_name_recursive(REG_KEY *parent, const char *path)
        return WERR_OK;
 }
 
-WERROR reg_key_add_name(REG_KEY *parent, const char *name, uint32 access_mask, SEC_DESC *desc, REG_KEY **newkey)
+WERROR reg_key_add_name(REG_KEY *parent, const char *name, uint32_t access_mask, SEC_DESC *desc, REG_KEY **newkey)
 {
        WERROR error;