diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-10-28 13:19:39 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:04:55 -0500 |
commit | a6ae640313a47ac2950c0948e4385fa934a5ef09 (patch) | |
tree | 3cc3cb8ec8c8cec020e85cd28e91c7dba128addf /source4/lib/time.c | |
parent | e481385391a25c19d82ce93fbec11a973cf82e9f (diff) | |
download | samba-a6ae640313a47ac2950c0948e4385fa934a5ef09.tar.gz samba-a6ae640313a47ac2950c0948e4385fa934a5ef09.tar.xz samba-a6ae640313a47ac2950c0948e4385fa934a5ef09.zip |
r3323: more warning reductions
(This used to be commit 5921587ec26e4892efc678421277e4969417d7f5)
Diffstat (limited to 'source4/lib/time.c')
-rw-r--r-- | source4/lib/time.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source4/lib/time.c b/source4/lib/time.c index eae30f581b..5ea9b46844 100644 --- a/source4/lib/time.c +++ b/source4/lib/time.c @@ -310,7 +310,15 @@ char *ldap_timestring(TALLOC_CTX *mem_ctx, time_t t) tm->tm_sec); } - +/* + a hack to move the stupid gcc strftime warning to one place - see manual page +*/ +#ifdef HAVE_STRFTIME +size_t sys_strftime(char *s, size_t max, const char *fmt, const struct tm *tm) +{ + return strftime(s, max, fmt, tm); +} +#endif /**************************************************************************** Return the date and time as a string @@ -333,7 +341,7 @@ char *timestring(TALLOC_CTX *mem_ctx, time_t t) in the gcc warning, not a bug in this code. See a recent strftime() manual page for details. */ - strftime(tempTime,sizeof(tempTime)-1,"%c %Z",tm); + sys_strftime(tempTime,sizeof(tempTime)-1,"%c %Z",tm); TimeBuf = talloc_strdup(mem_ctx, tempTime); #else TimeBuf = talloc_strdup(mem_ctx, asctime(tm)); |