From: Harald Welte Date: Fri, 16 Jul 2004 13:51:42 +0000 (+0000) Subject: In C, we declare variables at the top of function (Olivier Clerget) X-Git-Tag: v1.3.0-rc1~79 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e4bb564d9c1b7a4ecd14cac52224ae9c63b38b5;p=thirdparty%2Fiptables.git In C, we declare variables at the top of function (Olivier Clerget) --- diff --git a/extensions/libipt_time.c b/extensions/libipt_time.c index 8b6077a6..7d722fbd 100644 --- a/extensions/libipt_time.c +++ b/extensions/libipt_time.c @@ -452,10 +452,11 @@ divide_time(int fulltime, int *hours, int *minutes) static void print_date(time_t date, char *command) { + struct tm *t; + /* If it's default value, don't print..*/ if (((date == 0) || (date == LONG_MAX)) && (command != NULL)) return; - struct tm *t; t = localtime(&date); if (command != NULL) printf("%s %d:%d:%d:%d:%d:%d ", command, (t->tm_year + 1900), (t->tm_mon + 1),