diff mbox series

[16/30] storagefile: Don't access backingStoreRaw directly in FromBackingRelative

Message ID da48557ebad7d8236507876254bdefbb7dddb707.1570482718.git.crobinso@redhat.com
State New
Headers show
Series storagefile, security: qcow2 data_file support | expand

Commit Message

Cole Robinson Oct. 7, 2019, 9:49 p.m. UTC
For the only usage, the rel == parent->backingStoreRaw, so drop
the direct access

Signed-off-by: Cole Robinson <crobinso@redhat.com>

---
 src/util/virstoragefile.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.23.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Comments

Daniel Henrique Barboza Oct. 9, 2019, 9:59 p.m. UTC | #1
On 10/7/19 6:49 PM, Cole Robinson wrote:
> For the only usage, the rel == parent->backingStoreRaw, so drop

> the direct access

>

> Signed-off-by: Cole Robinson <crobinso@redhat.com>

> ---


Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>


>   src/util/virstoragefile.c | 2 +-

>   1 file changed, 1 insertion(+), 1 deletion(-)

>

> diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c

> index 53fe4590b4..c47df6c200 100644

> --- a/src/util/virstoragefile.c

> +++ b/src/util/virstoragefile.c

> @@ -2625,7 +2625,7 @@ virStorageSourceNewFromBackingRelative(virStorageSourcePtr parent,

>           return NULL;

>   

>       /* store relative name */

> -    if (VIR_STRDUP(def->relPath, parent->backingStoreRaw) < 0)

> +    if (VIR_STRDUP(def->relPath, rel) < 0)

>           return NULL;

>   

>       if (!(dirname = mdir_name(parent->path))) {


--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
diff mbox series

Patch

diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c
index 53fe4590b4..c47df6c200 100644
--- a/src/util/virstoragefile.c
+++ b/src/util/virstoragefile.c
@@ -2625,7 +2625,7 @@  virStorageSourceNewFromBackingRelative(virStorageSourcePtr parent,
         return NULL;
 
     /* store relative name */
-    if (VIR_STRDUP(def->relPath, parent->backingStoreRaw) < 0)
+    if (VIR_STRDUP(def->relPath, rel) < 0)
         return NULL;
 
     if (!(dirname = mdir_name(parent->path))) {