summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2022-10-17 11:00:34 +0200
committerdefault <nobody@localhost>2022-10-17 11:00:34 +0200
commit3462ecc950676be944766b0ef7999e1382682e19 (patch)
treec9706ef98835885e496e4e2aa9010a80ca919762 /main.c
parent2efdcaae05434e48d2e814195d3dd712d2613dc8 (diff)
New function purge_all().
Diffstat (limited to 'main.c')
-rw-r--r--main.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/main.c b/main.c
index db691eb..0c13819 100644
--- a/main.c
+++ b/main.c
@@ -97,18 +97,7 @@ int main(int argc, char *argv[])
}
if (strcmp(cmd, "purge") == 0) {
- /* iterate all users */
- xs *list = user_list();
- char *p, *uid;
-
- p = list;
- while (xs_list_iter(&p, &uid)) {
- if (user_open(&snac, uid)) {
- purge(&snac);
- user_free(&snac);
- }
- }
-
+ purge_all();
return 0;
}