diff options
author | victor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-09-09 22:27:06 +0800 |
---|---|---|
committer | victor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-09-09 22:27:06 +0800 |
commit | 428f0736872120d93a2820d5012908f1f0ab6944 (patch) | |
tree | 210409733bc4462b06f85203b6ed0b616195699e /mbbsd | |
parent | 6944237f6f9c290924af32be4c93343712e86147 (diff) | |
download | pttbbs-428f0736872120d93a2820d5012908f1f0ab6944.tar pttbbs-428f0736872120d93a2820d5012908f1f0ab6944.tar.gz pttbbs-428f0736872120d93a2820d5012908f1f0ab6944.tar.bz2 pttbbs-428f0736872120d93a2820d5012908f1f0ab6944.tar.lz pttbbs-428f0736872120d93a2820d5012908f1f0ab6944.tar.xz pttbbs-428f0736872120d93a2820d5012908f1f0ab6944.tar.zst pttbbs-428f0736872120d93a2820d5012908f1f0ab6944.zip |
it's an interesting story between me and scw XD
git-svn-id: http://opensvn.csie.org/pttbbs/branches/victor.solaris@2187 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/brc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mbbsd/brc.c b/mbbsd/brc.c index 6c4ea053..4233ea59 100644 --- a/mbbsd/brc.c +++ b/mbbsd/brc.c @@ -167,7 +167,7 @@ brc_insert_record(brcbid_t bid, brcnbrd_t num, time_t* list) num--; /* don't write the times before brc_expire_time */ if (!ptr) { - brc_size -= tnum; + brc_size -= (int)tnum; /* put on the beginning */ if (num){ @@ -313,8 +313,9 @@ brc_initialize(){ int brc_read_record(int bid, int *num, time_t *list){ char *ptr; - *num = 0; - ptr = brc_findrecord_in(brc_buf, brc_buf + brc_size, bid, (brcnbrd_t*)num); + brcnbrd_t tnum; + ptr = brc_findrecord_in(brc_buf, brc_buf + brc_size, bid, &tnum); + *num = tnum; if ( ptr ){ memcpy(list, ptr + sizeof(brcbid_t) + sizeof(brcnbrd_t), *num * sizeof(time_t)); |