Commit 5761980d by Calvin Buckley

Simplifications to definitions to avoid UINT64_C

parent 017f38f1
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment