summaryrefslogtreecommitdiffstats
path: root/mbbsd/stuff.c
diff options
context:
space:
mode:
authorkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-06-28 16:47:45 +0800
committerkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-06-28 16:47:45 +0800
commit2dea9dc6eeee3dcd9a0ebc32dcee9723c4787c91 (patch)
tree87e9a623c3a4426e104f87511e2b66f86f75a829 /mbbsd/stuff.c
parentc5f8b96c358e673945943d92c4ba562eba1f96ec (diff)
downloadpttbbs-2dea9dc6eeee3dcd9a0ebc32dcee9723c4787c91.tar
pttbbs-2dea9dc6eeee3dcd9a0ebc32dcee9723c4787c91.tar.gz
pttbbs-2dea9dc6eeee3dcd9a0ebc32dcee9723c4787c91.tar.bz2
pttbbs-2dea9dc6eeee3dcd9a0ebc32dcee9723c4787c91.tar.lz
pttbbs-2dea9dc6eeee3dcd9a0ebc32dcee9723c4787c91.tar.xz
pttbbs-2dea9dc6eeee3dcd9a0ebc32dcee9723c4787c91.tar.zst
pttbbs-2dea9dc6eeee3dcd9a0ebc32dcee9723c4787c91.zip
assert() the return value of strchr() strrchr()
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@982 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/stuff.c')
-rw-r--r--mbbsd/stuff.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/mbbsd/stuff.c b/mbbsd/stuff.c
index f79ec1ae..a254b42c 100644
--- a/mbbsd/stuff.c
+++ b/mbbsd/stuff.c
@@ -1,4 +1,4 @@
-/* $Id: stuff.c,v 1.11 2003/03/26 10:22:42 in2 Exp $ */
+/* $Id: stuff.c,v 1.12 2003/06/28 08:47:45 kcwu Exp $ */
#include "bbs.h"
/* ----------------------------------------------------- */
@@ -78,11 +78,17 @@ setbfile(char *buf, char *boardname, char *fname)
sprintf(buf, str_board_file, boardname[0], boardname, fname);
}
+/*
+ * input direct
+ * output buf: copy direct
+ * fname: direct ªºÀɦW³¡¤À
+ */
void
setdirpath(char *buf, char *direct, char *fname)
{
strcpy(buf, direct);
direct = strrchr(buf, '/');
+ assert(direct);
strcpy(direct + 1, fname);
}