Code cleanup

This commit is contained in:
Michiel Broek 2004-07-11 09:36:44 +00:00
parent 6f03858520
commit 075cfa6841
2 changed files with 59 additions and 57 deletions

View File

@ -26,6 +26,7 @@ v0.61.1 20-Jun-2004.
mbfido:
Added compile directive for full newsgate.
Removed logmessage in addpkt function.
mbindex:
Code cleanup for nodelist processing.

View File

@ -244,8 +244,7 @@ int AddMsgHdr(FILE *fp, faddr *f, faddr *t, int flags, int cost, time_t date, ch
struct tm *Tm;
if ((tname == NULL) || (strlen(tname) > 36) ||
(fname == NULL) || (strlen(fname) > 36) ||
(subj == NULL) || (strlen(subj) > 72)) {
(fname == NULL) || (strlen(fname) > 36) || (subj == NULL) || (strlen(subj) > 72)) {
if (tname == NULL)
WriteError("AddMsgHdr() error, To name is NULL");
else if (strlen(tname) > 36)
@ -298,7 +297,9 @@ int AddMsgHdr(FILE *fp, faddr *f, faddr *t, int flags, int cost, time_t date, ch
fprintf(fp, "%s%c", tname, '\0');
fprintf(fp, "%s%c", fname, '\0');
if (flags & M_FILE) {
Syslog('-', "change %s to %s", subj, basename(subj));
/*
* Strip path of filenames in the subject line.
*/
fprintf(fp, "%s%c", basename(subj), '\0');
} else {
fprintf(fp, "%s%c", subj, '\0');