[Devel] [PATCH 01/10] get_date() gets shorter
Igor Podlesny
openvz at poige.ru
Mon May 6 23:42:03 PDT 2013
---
src/lib/logger.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/lib/logger.c b/src/lib/logger.c
index 6727d0f..af18f26 100644
--- a/src/lib/logger.c
+++ b/src/lib/logger.c
@@ -55,11 +55,8 @@ static int ploop_log = 0;
static inline void get_date(char *buf, int len)
{
- struct tm *p_tm_time;
- time_t ptime;
-
- ptime = time(NULL);
- p_tm_time = localtime(&ptime);
+ time_t ptime = time(NULL);
+ struct tm *p_tm_time = localtime(&ptime);
strftime(buf, len, "%Y-%m-%dT%T%z", p_tm_time);
}
--
1.7.9.5
More information about the Devel
mailing list