summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlaforge <laforge>2004-07-16 13:51:42 +0000
committerlaforge <laforge>2004-07-16 13:51:42 +0000
commit3980243c2217b1dca80c3925a63f58258f09668b (patch)
tree8f87b874af22fff66ddbd1b537e9a14231f9425d
parentb0ea92e7e9a855583d18ed2f20c0cb3623dc3aa1 (diff)
In C, we declare variables at the top of function (Olivier Clerget)
-rw-r--r--extensions/libipt_time.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/extensions/libipt_time.c b/extensions/libipt_time.c
index 8b6077a..7d722fb 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),