summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2019-07-09 15:25:40 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-07-09 15:25:40 -0700
commitaa5bec81c871fc564f1016e352ef2c25c928674e (patch)
treec9e38cd9d7943fcfb4b9022dd1bd11b6b937b9fc
parentMerge branch 'jk/trailers-use-config' (diff)
parentwrapper: avoid undefined behaviour in macOS (diff)
downloadtgif-aa5bec81c871fc564f1016e352ef2c25c928674e.tar.xz
Merge branch 'cb/mkstemps-uint-type-fix'
Variable type fix. * cb/mkstemps-uint-type-fix: wrapper: avoid undefined behaviour in macOS
-rw-r--r--wrapper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/wrapper.c b/wrapper.c
index ea3cf64d4c..1e45ab7b92 100644
--- a/wrapper.c
+++ b/wrapper.c
@@ -502,7 +502,7 @@ int git_mkstemps_mode(char *pattern, int suffix_len, int mode)
* Try TMP_MAX different filenames.
*/
gettimeofday(&tv, NULL);
- value = ((size_t)(tv.tv_usec << 16)) ^ tv.tv_sec ^ getpid();
+ value = ((uint64_t)tv.tv_usec << 16) ^ tv.tv_sec ^ getpid();
filename_template = &pattern[len - 6 - suffix_len];
for (count = 0; count < TMP_MAX; ++count) {
uint64_t v = value;