Skip to content

Commit 5761980

Browse files
committed
Simplifications to definitions to avoid UINT64_C
1 parent 017f38f commit 5761980

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/commit_graph.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,11 +1075,11 @@ static int commit_graph_write(
10751075
commit_time = (uint64_t)packed_commit->commit_time;
10761076
if (generation > GIT_COMMIT_GRAPH_GENERATION_NUMBER_MAX)
10771077
generation = GIT_COMMIT_GRAPH_GENERATION_NUMBER_MAX;
1078-
word = ntohl((uint32_t)((generation << 2) | ((commit_time >> UINT64_C(32)) & UINT64_C(0x3))));
1078+
word = ntohl((uint32_t)((generation << 2) | (((uint32_t)(commit_time >> 32)) & 0x3) ));
10791079
error = git_str_put(&commit_data, (const char *)&word, sizeof(word));
10801080
if (error < 0)
10811081
goto cleanup;
1082-
word = ntohl((uint32_t)(commit_time & UINT64_C(0xffffffff)));
1082+
word = ntohl((uint32_t)(commit_time & 0xfffffffful));
10831083
error = git_str_put(&commit_data, (const char *)&word, sizeof(word));
10841084
if (error < 0)
10851085
goto cleanup;

0 commit comments

Comments
 (0)