]> wimlib.net Git - wimlib/blobdiff - src/write.c
Improve helper functions for setting blob locations
[wimlib] / src / write.c
index 75a6fcf2e454a0785248ea800c985fe9ea60faa2..6be215e3e76570bd38aa12fc28afec740911f92f 100644 (file)
@@ -1788,9 +1788,7 @@ write_wim_resource_from_buffer(const void *buf,
        int ret;
        struct blob_descriptor blob;
 
-       blob.blob_location = BLOB_IN_ATTACHED_BUFFER;
-       blob.attached_buffer = (void*)buf;
-       blob.size = buf_size;
+       blob_set_is_located_in_attached_buffer(&blob, (void *)buf, buf_size);
        sha1_buffer(buf, buf_size, blob.hash);
        blob.unhashed = 0;
        blob.is_metadata = is_metadata;