registry: change reghook_cache_add() to return WERROR instead of bool
[kai/samba.git] / source3 / registry / reg_init_full.c
index 8c834c4abb5c159b0f72dcee046c24d8aa9c2eff..e24cb61481b3aa4b069d5fbc97248d1e0e1fa1ce 100644 (file)
@@ -93,8 +93,10 @@ bool init_registry( void )
        }
 
        for ( i=0; reg_hooks[i].keyname; i++ ) {
-               if (!reghook_cache_add(reg_hooks[i].keyname, reg_hooks[i].ops))
+               werr = reghook_cache_add(reg_hooks[i].keyname, reg_hooks[i].ops);
+               if (!W_ERROR_IS_OK(werr)) {
                        goto fail;
+               }
        }
 
        if ( DEBUGLEVEL >= 20 )