diff options
author | Richard Ipsum <richard.ipsum@codethink.co.uk> | 2014-06-03 12:18:53 +0100 |
---|---|---|
committer | Richard Ipsum <richard.ipsum@codethink.co.uk> | 2014-06-03 12:18:53 +0100 |
commit | ddddefa4f84c439757431f9afd7917d1912e7204 (patch) | |
tree | 34113f1212b8b45cbb1306e71094c15204f8ca4f | |
parent | 9d92cc9d71416bec5c9dca0dc92ce4ac51dc420e (diff) | |
download | tbdiff-ddddefa4f84c439757431f9afd7917d1912e7204.tar.gz |
Add comment to explain the cast to longbaserock/richardipsum/upgrades
-rw-r--r-- | tbdiff/tbdiff-apply.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tbdiff/tbdiff-apply.c b/tbdiff/tbdiff-apply.c index e281d73..edc8d0b 100644 --- a/tbdiff/tbdiff-apply.c +++ b/tbdiff/tbdiff-apply.c @@ -493,6 +493,11 @@ tbd_apply_cmd_symlink_create(FILE *stream) struct timeval tv[2]; gettimeofday(&tv[0], NULL); + + /* We cast to a long here so that on a 32 bit system we get + * the time truncated to a 32 bit value, on a 64 bit system + * the long will remain 64 bits. + */ tv[1].tv_sec = (long) mtime; tv[1].tv_usec = 0; |