From 14c53cd601a6aba5811909ded3dae4992d707271 Mon Sep 17 00:00:00 2001 From: xazax-hun Date: Sun, 22 Jan 2012 13:49:09 +0000 Subject: Minor cleanups, mostly reducing scopes. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15504 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/pc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/map/pc.c') diff --git a/src/map/pc.c b/src/map/pc.c index 3155484dd..1b0d3f57a 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -8541,9 +8541,6 @@ int pc_readdb(void) // Read MOTD on startup. [Valaris] int pc_read_motd(void) { - char* buf, * ptr; - unsigned int lines = 0, entries = 0; - size_t len; FILE* fp; // clear old MOTD @@ -8552,6 +8549,10 @@ int pc_read_motd(void) // read current MOTD if( ( fp = fopen(motd_txt, "r") ) != NULL ) { + char* buf, * ptr; + unsigned int lines = 0, entries = 0; + size_t len; + while( entries < MOTD_LINE_SIZE && fgets(motd_text[entries], sizeof(motd_text[entries]), fp) ) { lines++; -- cgit v1.2.3-60-g2f50