summaryrefslogtreecommitdiffstats
path: root/mbbsd/brc.c
diff options
context:
space:
mode:
authorkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-06-10 03:32:29 +0800
committerkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-06-10 03:32:29 +0800
commitbdc87f99f91971140d7026106b467ac29c76e6eb (patch)
tree7ecebfc542b786e6cc0eea5878662351079be0e9 /mbbsd/brc.c
parentbc230589951eeb8c8e476d92a3d39b319f543427 (diff)
downloadpttbbs-bdc87f99f91971140d7026106b467ac29c76e6eb.tar
pttbbs-bdc87f99f91971140d7026106b467ac29c76e6eb.tar.gz
pttbbs-bdc87f99f91971140d7026106b467ac29c76e6eb.tar.bz2
pttbbs-bdc87f99f91971140d7026106b467ac29c76e6eb.tar.lz
pttbbs-bdc87f99f91971140d7026106b467ac29c76e6eb.tar.xz
pttbbs-bdc87f99f91971140d7026106b467ac29c76e6eb.tar.zst
pttbbs-bdc87f99f91971140d7026106b467ac29c76e6eb.zip
code clean up
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3538 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/brc.c')
-rw-r--r--mbbsd/brc.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/mbbsd/brc.c b/mbbsd/brc.c
index 2f1639d0..8c4b86da 100644
--- a/mbbsd/brc.c
+++ b/mbbsd/brc.c
@@ -447,20 +447,9 @@ brc_unread_time(time4_t ftime, int bnum, const time4_t *blist)
int
brc_unread(const char *fname, int bnum, const time4_t *blist)
{
- int ftime, n;
+ int ftime;
ftime = atoi(&fname[2]); /* this will get the time of the file created */
- if (ftime <= brc_expire_time) /* too old */
- return 0;
-
- if (bnum <= 0)
- return 1;
- for (n = 0; n < bnum; n++) { /* using linear search */
- if (ftime > blist[n])
- return 1;
- else if (ftime == blist[n])
- return 0;
- }
- return 0;
+ return brc_unread_time(ftime, bnum, blist);
}