Remove unnecessary casts in timeval.tv_sec load from st_*time
This commit is contained in:
parent
cd9c425794
commit
6e63a1049a
@ -716,8 +716,8 @@ set_ftime(fnm, mtime, atime, frc)
|
|||||||
static struct timeval tv[2] = {{0L, 0L}, {0L, 0L}};
|
static struct timeval tv[2] = {{0L, 0L}, {0L, 0L}};
|
||||||
struct stat sb;
|
struct stat sb;
|
||||||
|
|
||||||
tv[0].tv_sec = (long)atime;
|
tv[0].tv_sec = atime;
|
||||||
tv[1].tv_sec = (long)mtime;
|
tv[1].tv_sec = mtime;
|
||||||
if (!frc && (!patime || !pmtime)) {
|
if (!frc && (!patime || !pmtime)) {
|
||||||
/*
|
/*
|
||||||
* if we are not forcing, only set those times the user wants
|
* if we are not forcing, only set those times the user wants
|
||||||
@ -725,9 +725,9 @@ set_ftime(fnm, mtime, atime, frc)
|
|||||||
*/
|
*/
|
||||||
if (lstat(fnm, &sb) == 0) {
|
if (lstat(fnm, &sb) == 0) {
|
||||||
if (!patime)
|
if (!patime)
|
||||||
tv[0].tv_sec = (long)sb.st_atime;
|
tv[0].tv_sec = sb.st_atime;
|
||||||
if (!pmtime)
|
if (!pmtime)
|
||||||
tv[1].tv_sec = (long)sb.st_mtime;
|
tv[1].tv_sec = sb.st_mtime;
|
||||||
} else
|
} else
|
||||||
syswarn(0,errno,"Unable to obtain file stats %s", fnm);
|
syswarn(0,errno,"Unable to obtain file stats %s", fnm);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user