static NTSTATUS idmap_autorid_db_init(void)
{
int32_t hwm;
+ NTSTATUS status;
if (autorid_db) {
/* its already open */
/* Initialize high water mark for the currently used range to 0 */
hwm = dbwrap_fetch_int32(autorid_db, HWM);
if ((hwm < 0)) {
- if (!NT_STATUS_IS_OK
- (dbwrap_trans_store_int32(autorid_db, HWM, 0))) {
+ status = dbwrap_trans_store_int32(autorid_db, HWM, 0);
+ if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,
("Unable to initialise HWM in autorid "
- "database\n"));
+ "database: %s\n", nt_errstr(status)));
return NT_STATUS_INTERNAL_DB_ERROR;
}
}
/* Initialize high water mark for alloc pool to 0 */
hwm = dbwrap_fetch_int32(autorid_db, ALLOC_HWM);
if ((hwm < 0)) {
- if (!NT_STATUS_IS_OK
- (dbwrap_trans_store_int32(autorid_db, ALLOC_HWM, 0))) {
+ status = dbwrap_trans_store_int32(autorid_db, ALLOC_HWM, 0);
+ if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,
("Unable to initialise HWM in autorid "
- "database\n"));
+ "database: %s\n", nt_errstr(status)));
return NT_STATUS_INTERNAL_DB_ERROR;
}
}