summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCalvin Buckley <calvin@cmpct.info>2021-12-11 22:33:16 -0400
committerCalvin Buckley <calvin@cmpct.info>2021-12-11 22:33:16 -0400
commit5761980d11c739be3b360b5fb0d45552d8495291 (patch)
treea144f4b490c1545f4daa3563b67ce217bb7dc9cf
parent017f38f17cc51ab1e949a14713da6ab2ec66648b (diff)
downloadlibgit2-5761980d11c739be3b360b5fb0d45552d8495291.tar.gz
Simplifications to definitions to avoid UINT64_C
-rw-r--r--src/commit_graph.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/commit_graph.c b/src/commit_graph.c
index 82b3901b3..3709fa341 100644
--- a/src/commit_graph.c
+++ b/src/commit_graph.c
@@ -1075,11 +1075,11 @@ static int commit_graph_write(
commit_time = (uint64_t)packed_commit->commit_time;
if (generation > GIT_COMMIT_GRAPH_GENERATION_NUMBER_MAX)
generation = GIT_COMMIT_GRAPH_GENERATION_NUMBER_MAX;
- word = ntohl((uint32_t)((generation << 2) | ((commit_time >> UINT64_C(32)) & UINT64_C(0x3))));
+ word = ntohl((uint32_t)((generation << 2) | (((uint32_t)(commit_time >> 32)) & 0x3) ));
error = git_str_put(&commit_data, (const char *)&word, sizeof(word));
if (error < 0)
goto cleanup;
- word = ntohl((uint32_t)(commit_time & UINT64_C(0xffffffff)));
+ word = ntohl((uint32_t)(commit_time & 0xfffffffful));
error = git_str_put(&commit_data, (const char *)&word, sizeof(word));
if (error < 0)
goto cleanup;