summaryrefslogtreecommitdiffstats
path: root/util/cleanpasswd.c
diff options
context:
space:
mode:
authorvictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-10-14 21:47:51 +0800
committervictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-10-14 21:47:51 +0800
commit94cc8a63ccdd6ffac35d6a1e27083ef78c453c4f (patch)
tree5e3c2b9cefb040cedfed60835d0d73e17bbe35fb /util/cleanpasswd.c
parent416c211e7d2fb54bb2e1df432e01ac8772c1c763 (diff)
downloadpttbbs-94cc8a63ccdd6ffac35d6a1e27083ef78c453c4f.tar
pttbbs-94cc8a63ccdd6ffac35d6a1e27083ef78c453c4f.tar.gz
pttbbs-94cc8a63ccdd6ffac35d6a1e27083ef78c453c4f.tar.bz2
pttbbs-94cc8a63ccdd6ffac35d6a1e27083ef78c453c4f.tar.lz
pttbbs-94cc8a63ccdd6ffac35d6a1e27083ef78c453c4f.tar.xz
pttbbs-94cc8a63ccdd6ffac35d6a1e27083ef78c453c4f.tar.zst
pttbbs-94cc8a63ccdd6ffac35d6a1e27083ef78c453c4f.zip
wrong filename
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1243 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'util/cleanpasswd.c')
-rw-r--r--util/cleanpasswd.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/util/cleanpasswd.c b/util/cleanpasswd.c
new file mode 100644
index 00000000..3632ad5e
--- /dev/null
+++ b/util/cleanpasswd.c
@@ -0,0 +1,26 @@
+/* $Id: toplazyBM.c 1096 2003-08-15 06:13:29Z victor $ */
+#define _UTIL_C_
+#include "bbs.h"
+
+extern userec_t xuser;
+
+/* 當資料欄位有異動 例如用了舊的欄位 可用這個程式清除舊值 */
+int clean_unused_var(userec_t *rec)
+{
+ rec->goodpost = 0;
+ rec->badpost = 0;
+ rec->goodsale = 0;
+ rec->badsale = 0;
+ memset(rec->pad, 0, sizeof(rec->pad));
+ return 0;
+}
+
+int main(int argc, char *argv[])
+{
+ attach_SHM();
+ if(passwd_init())
+ exit(1);
+ if (passwd_apply(clean_unused_var) == 0)
+ printf("ERROR\n");
+ return 0;
+}