summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-07-25 12:57:46 -0400
committerVolker Lendecke <vl@samba.org>2009-07-25 12:59:21 -0400
commit9ca44867b0c71ac60aedc65a2dc3886629df563c (patch)
tree562e61976016cbf1de7f2f4237760a3e53a498e5 /source3/utils
parent7c768ddab6c0fb2868c4464fcb760994792dd898 (diff)
downloadsamba-9ca44867b0c71ac60aedc65a2dc3886629df563c.tar.gz
samba-9ca44867b0c71ac60aedc65a2dc3886629df563c.tar.bz2
samba-9ca44867b0c71ac60aedc65a2dc3886629df563c.zip
Remove a pointless static fstring
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_time.c8
1 files changed, 3 insertions, 5 deletions
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)