From cc1a92e512d3459de94e8e1981549088445c8320 Mon Sep 17 00:00:00 2001 From: Ron Koenderink Date: Thu, 30 Dec 2004 01:43:39 +0000 Subject: [PATCH] (rea): Code cleanup. --- src/lib/commands/rea.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/lib/commands/rea.c b/src/lib/commands/rea.c index e1437794..df9a4f80 100644 --- a/src/lib/commands/rea.c +++ b/src/lib/commands/rea.c @@ -79,7 +79,7 @@ rea(void) int readit; memset(kind, 0, sizeof(kind)); - (void)time(&now); + now = time(NULL); if (*player->argp[0] == 'w') { sprintf(kind, "announcement"); @@ -147,12 +147,9 @@ rea(void) lasttype = tgm.tel_type; pr("%s ", telnames[(int)tgm.tel_type]); if ((tgm.tel_type == TEL_NORM) || - (tgm.tel_type == TEL_ANNOUNCE)) { + (tgm.tel_type == TEL_ANNOUNCE) || + (tgm.tel_type == TEL_BULLETIN)) pr("from %s, (#%d)", cname(tgm.tel_from), tgm.tel_from); - } - if (tgm.tel_type == TEL_BULLETIN) { - pr("from %s, (#%d)", cname(tgm.tel_from), tgm.tel_from); - } pr(" dated %s", ctime(&tgm.tel_date)); lastdate = tgm.tel_date; } @@ -194,7 +191,7 @@ rea(void) (void)fflush(telfp); (void)fseek(telfp, (long)size, SEEK_SET); size = filelen; - (void)time(&now); + now = time(NULL); goto more; } if (*kind == 'a') { @@ -208,12 +205,11 @@ rea(void) } } } - if (teles <= 0) { + if (teles <= 0) if (player->cnum == num) pr("No %ss for you at the moment...\n", kind); else pr("No %ss for %s at the moment...\n", kind, cname(num)); - } (void)fclose(telfp); if (np->nat_flags & NF_INFORM) { pr_inform(player, "\n");