summaryrefslogtreecommitdiffstats
path: root/src/util/build_id.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-02-24 16:29:26 -0800
committerJason Ekstrand <[email protected]>2017-03-01 15:31:44 -0800
commite647c4fbd9a186d9df9d5b0e50507f33180214a8 (patch)
tree2ce033265c97e149d4fa289d90e88e76ae658ea8 /src/util/build_id.c
parente3d33a23e6cbe2b73b412a56bb4fc4aa6852d081 (diff)
util/build-id: Return a pointer rather than copying the data
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 <[email protected]>
Diffstat (limited to 'src/util/build_id.c')
-rw-r--r--src/util/build_id.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/util/build_id.c b/src/util/build_id.c
index cc0f8527302..c53e71ddfd1 100644
--- a/src/util/build_id.c
+++ b/src/util/build_id.c
@@ -107,11 +107,10 @@ build_id_length(const struct build_id_note *note)
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