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:
parent
d8c4a660a0
commit
041f77b6a1
@ -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));
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user