]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
In C, we declare variables at the top of function (Olivier Clerget)
authorHarald Welte <laforge@gnumonks.org>
Fri, 16 Jul 2004 13:51:42 +0000 (13:51 +0000)
committerHarald Welte <laforge@gnumonks.org>
Fri, 16 Jul 2004 13:51:42 +0000 (13:51 +0000)
extensions/libipt_time.c

index 8b6077a66e27c066b688fd3ac2af00a25da04934..7d722fbd3557de5aa6c0dfb7f6e0ded77290421c 100644 (file)
@@ -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),