mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-02 13:20:51 +00:00
Fix localtime_r and gmtmime_r signatures
This commit is contained in:
1 parent
456e8bd249
commit
6c79a406cd
3 files changed
+26
-24
No files matched your search
+2
-2
@@ -90,13 +90,13 @@ typedef int socklen_t;
|
||||
#endif
|
||||
|
||||
// https://lgtm.com/rules/2154840805/ -gmtime, localtime, ctime and asctime
|
||||
static __inline struct tm *gmtime_r(time_t *t, struct tm *tm) {
|
||||
static __inline struct tm *gmtime_r(const time_t *t, struct tm *tm) {
|
||||
struct tm *x = gmtime(t);
|
||||
*tm = *x;
|
||||
return tm;
|
||||
}
|
||||
|
||||
static __inline struct tm *localtime_r(time_t *t, struct tm *tm) {
|
||||
static __inline struct tm *localtime_r(const time_t *t, struct tm *tm) {
|
||||
struct tm *x = localtime(t);
|
||||
*tm = *x;
|
||||
return tm;
|
||||
|
||||
Reference in new issue
Block a user