summaryrefslogtreecommitdiffstats
path: root/mbbsd/admin.c
diff options
context:
space:
mode:
authorkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-07-22 04:39:34 +0800
committerkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-07-22 04:39:34 +0800
commit1357136003927f736b8d3e91c1970d4cc7861977 (patch)
treec3ae703bebaadc6d54926280fa0721718e50703f /mbbsd/admin.c
parent290e94c252bf0d1b384b3775cd9de04f5afa341a (diff)
downloadpttbbs-1357136003927f736b8d3e91c1970d4cc7861977.tar
pttbbs-1357136003927f736b8d3e91c1970d4cc7861977.tar.gz
pttbbs-1357136003927f736b8d3e91c1970d4cc7861977.tar.bz2
pttbbs-1357136003927f736b8d3e91c1970d4cc7861977.tar.lz
pttbbs-1357136003927f736b8d3e91c1970d4cc7861977.tar.xz
pttbbs-1357136003927f736b8d3e91c1970d4cc7861977.tar.zst
pttbbs-1357136003927f736b8d3e91c1970d4cc7861977.zip
check the using of `sizeof' with strlcpy()
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@432 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/admin.c')
-rw-r--r--mbbsd/admin.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mbbsd/admin.c b/mbbsd/admin.c
index 8fe3621c..a9fe35ca 100644
--- a/mbbsd/admin.c
+++ b/mbbsd/admin.c
@@ -1,4 +1,4 @@
-/* $Id: admin.c,v 1.27 2002/07/21 09:26:02 in2 Exp $ */
+/* $Id: admin.c,v 1.28 2002/07/21 20:39:34 kcwu Exp $ */
#include "bbs.h"
/* 使用者管理 */
@@ -275,7 +275,7 @@ m_mod_board(char *bname)
if (genbuf[0] != 'y' || !bname[0])
outs(MSG_DEL_CANCEL);
else {
- strlcpy(bname, bh.brdname, sizeof(bname));
+ strlcpy(bname, bh.brdname, SIZEOF(bname));
sprintf(genbuf,
"/bin/tar zcvf tmp/board_%s.tgz boards/%c/%s man/boards/%c/%s >/dev/null 2>&1;"
"/bin/rm -fr boards/%c/%s man/boards/%c/%s",
@@ -777,7 +777,7 @@ scan_register_form(char *regfile, int automode, int neednum)
*ptr = '\0';
for (n = 0; field[n]; n++) {
if (strcmp(genbuf, field[n]) == 0) {
- strlcpy(fdata[n], ptr + 2, sizeof(fdata[n]));
+ strlcpy(fdata[n], ptr + 2, SIZEOF(fdata[n]));
if ((ptr = (char *)strchr(fdata[n], '\n')))
*ptr = '\0';
}