From bd6ab47d6742a7bb7d92da2fdcc4342eeb1434dc Mon Sep 17 00:00:00 2001 From: piaip Date: Wed, 21 May 2014 03:27:21 +0000 Subject: No temp define. git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5996 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- pttbbs/mbbsd/read.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pttbbs/mbbsd/read.c b/pttbbs/mbbsd/read.c index 2e82aff9..a7897a3a 100644 --- a/pttbbs/mbbsd/read.c +++ b/pttbbs/mbbsd/read.c @@ -1246,9 +1246,9 @@ i_read(int cmdmode, const char *direct, void (*dotitle) (), fileheader_t *headers0 = headers; int headers_size0 = headers_size; time4_t enter_time = now; + const size_t FHSZ = sizeof(fileheader_t); strlcpy(currdirect0, currdirect, sizeof(currdirect0)); -#define FHSZ sizeof(fileheader_t) /* Ptt: 這邊 headers 可以針對看板的最後 60 篇做 cache */ headers_size = p_lines; headers = (fileheader_t *) calloc(headers_size, FHSZ); @@ -1388,7 +1388,6 @@ i_read(int cmdmode, const char *direct, void (*dotitle) (), } //end switch mode = i_read_key(rcmdlist, locmem, currbid, bottom_line); } while (mode != DOQUIT && !ZA_Waiting()); -#undef FHSZ free(headers); last_line = last_line0; -- cgit v1.2.3