summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mbbsd/brc.c15
-rw-r--r--mbbsd/mbbsd.c2
2 files changed, 2 insertions, 15 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);
}
diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c
index 487641fb..4b48afa4 100644
--- a/mbbsd/mbbsd.c
+++ b/mbbsd/mbbsd.c
@@ -818,7 +818,6 @@ add_distinct(const char *fname, const char *line)
}
fclose(fp);
fclose(fptmp);
- unlink(fname);
rename(tmpname, fname);
}
}
@@ -865,7 +864,6 @@ del_distinct(const char *fname, const char *line, int casesensitive)
}
fclose(fp);
fclose(fptmp);
- unlink(fname);
rename(tmpname, fname);
}
}