From dd48cea912dfb860b552647750293f53d77aede4 Mon Sep 17 00:00:00 2001 From: Eric House Date: Tue, 2 Jul 2013 07:26:32 -0700 Subject: [PATCH] don't log string before it's initialized --- xwords4/linux/cursesmain.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xwords4/linux/cursesmain.c b/xwords4/linux/cursesmain.c index 2614dd0e7..e87955aff 100644 --- a/xwords4/linux/cursesmain.c +++ b/xwords4/linux/cursesmain.c @@ -1727,13 +1727,12 @@ chatsTimerFired( gpointer data ) struct timeval tv; struct timezone tz; - XP_LOGF( "%s: sending \"%s\"", __func__, msg ); - gettimeofday( &tv, &tz ); timp = localtime( &tv.tv_sec ); snprintf( msg, sizeof(msg), "Saying hi via chat at %.2d:%.2d:%.2d", timp->tm_hour, timp->tm_min, timp->tm_sec ); + XP_LOGF( "%s: sending \"%s\"", __func__, msg ); server_sendChat( globals->cGlobals.game.server, msg ); }