Fix localtime_r and gmtmime_r signatures

This commit is contained in:
Sergey Lyubka committed 2022-01-11 19:15:38 +00:00
1 parent 456e8bd249
commit 6c79a406cd
3 files changed
+26 -24

No files matched your search

+2 -2
View File
@@ -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;