1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-08 05:57:51 +03:00

r3579: with the gcc warning flag from abartlet we don't need sys_strftime()

This commit is contained in:
Andrew Tridgell 2004-11-06 12:14:14 +00:00 committed by Gerald (Jerry) Carter
parent d8c4a660a0
commit 041f77b6a1
2 changed files with 2 additions and 12 deletions

View File

@ -311,16 +311,6 @@ 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
****************************************************************************/
@ -342,7 +332,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.
*/
sys_strftime(tempTime,sizeof(tempTime)-1,"%c %Z",tm);
strftime(tempTime,sizeof(tempTime)-1,"%c %Z",tm);
TimeBuf = talloc_strdup(mem_ctx, tempTime);
#else
TimeBuf = talloc_strdup(mem_ctx, asctime(tm));

View File

@ -66,7 +66,7 @@ int net_time(struct net_context *ctx, int argc, const char **argv)
ZERO_ARRAY(timestr);
tm = localtime(&r.generic.out.time);
sys_strftime(timestr, sizeof(timestr)-1, "%c %Z",tm);
strftime(timestr, sizeof(timestr)-1, "%c %Z",tm);
printf("%s\n",timestr);