From 9ca44867b0c71ac60aedc65a2dc3886629df563c Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 25 Jul 2009 12:57:46 -0400 Subject: Remove a pointless static fstring --- source3/utils/net_time.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'source3/utils') diff --git a/source3/utils/net_time.c b/source3/utils/net_time.c index b6198376af..d37b5aac68 100644 --- a/source3/utils/net_time.c +++ b/source3/utils/net_time.c @@ -78,7 +78,6 @@ static time_t nettime(struct net_context *c, int *zone) /* return a time as a string ready to be passed to /bin/date */ static const char *systime(time_t t) { - static fstring s; struct tm *tm; tm = localtime(&t); @@ -86,10 +85,9 @@ static const char *systime(time_t t) return "unknown"; } - fstr_sprintf(s, "%02d%02d%02d%02d%04d.%02d", - tm->tm_mon+1, tm->tm_mday, tm->tm_hour, - tm->tm_min, tm->tm_year + 1900, tm->tm_sec); - return s; + return talloc_asprintf(talloc_tos(), "%02d%02d%02d%02d%04d.%02d", + tm->tm_mon+1, tm->tm_mday, tm->tm_hour, + tm->tm_min, tm->tm_year + 1900, tm->tm_sec); } int net_time_usage(struct net_context *c, int argc, const char **argv) -- cgit