/* now for the service values */
- if ( !(values = TALLOC_ZERO_P( key_service, struct regval_ctr )) ) {
+ wresult = regval_ctr_init(key_service, &values);
+ if (!W_ERROR_IS_OK(wresult)) {
DEBUG(0,("add_new_svc_name: talloc() failed!\n"));
TALLOC_FREE( key_service );
return;
}
SAFE_FREE(path);
- if ( !(values = TALLOC_ZERO_P( key_secdesc, struct regval_ctr )) ) {
+ wresult = regval_ctr_init(key_secdesc, &values);
+ if (!W_ERROR_IS_OK(wresult)) {
DEBUG(0,("add_new_svc_name: talloc() failed!\n"));
TALLOC_FREE( key_secdesc );
return;
goto done;
}
- if ( !(values = TALLOC_ZERO_P( key, struct regval_ctr )) ) {
+ wresult = regval_ctr_init(key, &values);
+ if (!W_ERROR_IS_OK(wresult)) {
DEBUG(0,("svcctl_get_secdesc: talloc() failed!\n"));
goto done;
}
}
SAFE_FREE(path);
- if ( !(values = TALLOC_ZERO_P( key, struct regval_ctr )) ) {
+ wresult = regval_ctr_init(key, &values);
+ if (!W_ERROR_IS_OK(wresult)) {
DEBUG(0,("svcctl_set_secdesc: talloc() failed!\n"));
TALLOC_FREE( key );
return False;
}
SAFE_FREE(path);
- if ( !(values = TALLOC_ZERO_P( key, struct regval_ctr )) ) {
+ wresult = regval_ctr_init(key, &values);
+ if (!W_ERROR_IS_OK(wresult)) {
DEBUG(0,("svcctl_lookup_dispname: talloc() failed!\n"));
TALLOC_FREE( key );
goto fail;
}
SAFE_FREE(path);
- if ( !(values = TALLOC_ZERO_P( key, struct regval_ctr )) ) {
+ wresult = regval_ctr_init(key, &values);
+ if (!W_ERROR_IS_OK(wresult)) {
DEBUG(0,("svcctl_lookup_description: talloc() failed!\n"));
TALLOC_FREE( key );
return NULL;
}
SAFE_FREE(path);
- if ( !(values = TALLOC_ZERO_P( NULL, struct regval_ctr )) ) {
+ wresult = regval_ctr_init(NULL, &values);
+ if (!W_ERROR_IS_OK(wresult)) {
DEBUG(0,("svcctl_fetch_regvalues: talloc() failed!\n"));
TALLOC_FREE( key );
return NULL;