Age | Commit message (Collapse) | Author | Files | Lines |
|
conditions
[clang-tidy] Found with bugprone-branch-clone
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
|
[clang-tidy] Found with readability-else-after-return
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
|
|
|
|
|
In ctime64_r, the call to localtime64_r can fail. If we don't check for
this and then call asctime64_r, the results are garbage.
Signed-off-by: Derrick Lyndon Pallas <derrick@pallas.us>
|
|
Clang fails with stricter compilation options, because it thinks safe_year may be uninitialized at the return statement. The logic prevents it from being uninitialized, but probably worth the initialization to avoid the compiler error. The rest of libimobiledevice compiles successfully under the same options.
|
|
|
|
The main benefit of this is to allow date/time values outside of the 32bit time_t
range which is very important on 32bit platforms. But there are also some other
issues that will be fixed with this, for example on macOS, mktime() will not work
for dates < 1902 despite time_t being 64bit.
In the same run this commit will also use a reentrant version of gmtime64_r that
should help in multithreaded scenarios.
Original code taken from: https://github.com/evalEmpire/y2038
|