(timeval2str): more braces to make gcc happy
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5551 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 1998 Kungliga Tekniska H<>gskolan
|
* Copyright (c) 1997, 1998, 1999 Kungliga Tekniska H<>gskolan
|
||||||
* (Royal Institute of Technology, Stockholm, Sweden).
|
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@@ -62,12 +62,12 @@ struct units kdb_attrs[] = {
|
|||||||
void
|
void
|
||||||
timeval2str(time_t t, char *str, size_t len, int include_time)
|
timeval2str(time_t t, char *str, size_t len, int include_time)
|
||||||
{
|
{
|
||||||
if(t)
|
if(t) {
|
||||||
if(include_time)
|
if(include_time)
|
||||||
strftime(str, len, "%Y-%m-%d %H:%M:%S UTC", gmtime(&t));
|
strftime(str, len, "%Y-%m-%d %H:%M:%S UTC", gmtime(&t));
|
||||||
else
|
else
|
||||||
strftime(str, len, "%Y-%m-%d", gmtime(&t));
|
strftime(str, len, "%Y-%m-%d", gmtime(&t));
|
||||||
else
|
} else
|
||||||
snprintf(str, len, "never");
|
snprintf(str, len, "never");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user