diff options
author | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2007-01-11 04:54:42 +0800 |
---|---|---|
committer | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2007-01-11 04:54:42 +0800 |
commit | 3a682078f1139a4bf98bd6c45ebe7c4529c37fe1 (patch) | |
tree | 9d8bbf20dc6f505347ee4a1f396b3522b5539fd0 /mbbsd/bbs.c | |
parent | c0ec6aa1cfa1ab6dc7db2453d68bb5b33c8d3644 (diff) | |
download | pttbbs-3a682078f1139a4bf98bd6c45ebe7c4529c37fe1.tar pttbbs-3a682078f1139a4bf98bd6c45ebe7c4529c37fe1.tar.gz pttbbs-3a682078f1139a4bf98bd6c45ebe7c4529c37fe1.tar.bz2 pttbbs-3a682078f1139a4bf98bd6c45ebe7c4529c37fe1.tar.lz pttbbs-3a682078f1139a4bf98bd6c45ebe7c4529c37fe1.tar.xz pttbbs-3a682078f1139a4bf98bd6c45ebe7c4529c37fe1.tar.zst pttbbs-3a682078f1139a4bf98bd6c45ebe7c4529c37fe1.zip |
fix a bug on stamp file which does unnecessary memset sometimes.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3471 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/bbs.c')
-rw-r--r-- | mbbsd/bbs.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index e984f30c..4dbae34b 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -512,7 +512,7 @@ cancelpost(const fileheader_t *fh, int by_BM, char *newpath) memcpy(&postfile, fh, sizeof(fileheader_t)); setbpath(newpath, brd); - stampfile(newpath, &postfile); + stampfile_u(newpath, &postfile); nick[0] = '\0'; while (fgets(genbuf, sizeof(genbuf), fin)) { @@ -760,7 +760,7 @@ static int do_general(int isbid) { bid_t bidinfo; - fileheader_t postfile, fh; + fileheader_t postfile; char fpath[80], buf[80]; int aborted, defanony, ifuseanony, i; char genbuf[200], *owner; @@ -944,11 +944,10 @@ do_general(int isbid) } strcpy(genbuf, fpath); setbpath(fpath, currboard); - stampfile(fpath, &fh); - strcpy(postfile.filename, fh.filename); + stampfile_u(fpath, &postfile); // Ptt: stamp file again to make it order // fix the bug that search failure in getindex - // + // stampfile_u is used when you don't want to clear other fields if (append_record(buf, &postfile, sizeof(postfile)) == -1) { unlink(genbuf); |