We're about to use the build-id as the starting point for another SHA1
hash in the Intel Vulkan driver, and returning a pointer is far more
convenient.
Reviewed-by: Chad Versace <chadversary@chromium.org>
if (len < VK_UUID_SIZE)
return false;
- build_id_read(note, uuid, VK_UUID_SIZE);
+ memcpy(uuid, build_id_data(note), VK_UUID_SIZE);
return true;
}
return note->nhdr.n_descsz;
}
-void
-build_id_read(const struct build_id_note *note,
- unsigned char *build_id, size_t n)
+const uint8_t *
+build_id_data(const struct build_id_note *note)
{
- memcpy(build_id, note->build_id, n);
+ return note->build_id;
}
#endif
unsigned
build_id_length(const struct build_id_note *note);
-void
-build_id_read(const struct build_id_note *note,
- unsigned char *build_id, size_t n);
+const uint8_t *
+build_id_data(const struct build_id_note *note);
#endif