projects
/
platform
/
upstream
/
python3-magic.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
eff9f0749d9d9bbb83f1a717d35985643b330d81
[platform/upstream/python3-magic.git]
/
src
/
ctime_r.c
1
/* $File$ */
2
3
#include "file.h"
4
#ifndef lint
5
FILE_RCSID("@(#)$File: ascmagic.c,v 1.84 2011/12/08 12:38:24 rrt Exp $")
6
#endif /* lint */
7
#include <time.h>
8
#include <string.h>
9
10
/* ctime_r is not thread-safe anyway */
11
char *
12
ctime_r(const time_t *t, char *dst)
13
{
14
char *p = ctime(t);
15
if (p == NULL)
16
return NULL;
17
memcpy(dst, p, 26);
18
return dst;
19
}