summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Ipsum <richard.ipsum@codethink.co.uk>2014-06-03 11:18:53 (GMT)
committerRichard Ipsum <richard.ipsum@codethink.co.uk>2014-06-03 11:18:53 (GMT)
commitddddefa4f84c439757431f9afd7917d1912e7204 (patch)
tree34113f1212b8b45cbb1306e71094c15204f8ca4f
parent9d92cc9d71416bec5c9dca0dc92ce4ac51dc420e (diff)
downloadtbdiff-baserock/richardipsum/upgrades.tar.gz
Add comment to explain the cast to longbaserock/richardipsum/upgrades
-rw-r--r--tbdiff/tbdiff-apply.c5
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;