mirror of
https://github.com/wassname/ray.git
synced 2026-08-13 12:30:18 +08:00
Use sizeof(field) instead of sizeof(type) and other fixes. (#47)
* Use sizeof(field) instead of sizeof(type) and other fixes. * Fix formatting. * Bug fix. * Zero-initialize structs. There are many more instances of these that I haven't changed yet. * Bug fix. * Revert from atexit to signaling to fix valgrind tests. * Address Philipp's comments.
This commit is contained in:
committed by
Philipp Moritz
parent
d77b685a90
commit
c8c3983195
+1
-1
@@ -108,7 +108,7 @@ task_id compute_task_id(task_spec *spec) {
|
||||
/* Create a task ID out of the hash. This will truncate the hash. */
|
||||
task_id task_id;
|
||||
CHECK(sizeof(task_id) <= SHA256_BLOCK_SIZE);
|
||||
memcpy(&task_id.id, buff, sizeof(task_id));
|
||||
memcpy(&task_id.id, buff, sizeof(task_id.id));
|
||||
return task_id;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user