summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2018-08-24 14:39:19 +0200
committerRalph Boehme <slow@samba.org>2018-09-03 18:44:23 +0200
commit89f9c163f32a409a40ae73455af892e58cd0e214 (patch)
tree7b36f07e5028f51ea0d5e0355f8076da6fbb6ac3 /source3
parent0bd109b733fbce774feae2142d25f7e828b56bcb (diff)
downloadsamba-89f9c163f32a409a40ae73455af892e58cd0e214.tar.gz
dbwrap_tool: Simplify dbwrap_tool_erase
That's what dbwrap_wipe is for :-) Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/dbwrap_tool.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/source3/utils/dbwrap_tool.c b/source3/utils/dbwrap_tool.c
index 94aacd8ba26..3ba0c52bb4c 100644
--- a/source3/utils/dbwrap_tool.c
+++ b/source3/utils/dbwrap_tool.c
@@ -280,13 +280,6 @@ static int dbwrap_tool_exists(struct db_context *db,
return (result)?0:1;
}
-
-static int delete_fn(struct db_record *rec, void *priv)
-{
- dbwrap_record_delete(rec);
- return 0;
-}
-
/**
* dbwrap_tool_erase: erase the whole data base
* the keyname argument is not used.
@@ -295,11 +288,11 @@ static int dbwrap_tool_erase(struct db_context *db,
const char *keyname,
const char *data)
{
- NTSTATUS status;
+ int ret;
- status = dbwrap_traverse(db, delete_fn, NULL, NULL);
+ ret = dbwrap_wipe(db);
- if (!NT_STATUS_IS_OK(status)) {
+ if (ret != 0) {
d_fprintf(stderr, "ERROR erasing the database\n");
return -1;
}