[libvirt] [PATCH] util: remove unused variable inside virFileReadValueString().

Julio Faracco posted 1 patch 5 years, 9 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20180714161406.6971-1-jcfaracco@gmail.com
Test syntax-check passed
src/util/virfile.c | 1 -
1 file changed, 1 deletion(-)
[libvirt] [PATCH] util: remove unused variable inside virFileReadValueString().
Posted by Julio Faracco 5 years, 9 months ago
The commit 69b937f0358 introduced VIR_AUTOFREE and this macro removed
VIR_FREE. This change showed that 'str' variable was not being used
inside this method. This commit removes this unused variable.

Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
---
 src/util/virfile.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/util/virfile.c b/src/util/virfile.c
index 6b94885a87..1faeebbdb5 100644
--- a/src/util/virfile.c
+++ b/src/util/virfile.c
@@ -4228,7 +4228,6 @@ int
 virFileReadValueString(char **value, const char *format, ...)
 {
     int ret;
-    VIR_AUTOFREE(char *) str = NULL;
     VIR_AUTOFREE(char *) path = NULL;
     va_list ap;
 
-- 
2.17.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] util: remove unused variable inside virFileReadValueString().
Posted by Roman Bogorodskiy 5 years, 9 months ago
  Julio Faracco wrote:

> The commit 69b937f0358 introduced VIR_AUTOFREE and this macro removed
> VIR_FREE. This change showed that 'str' variable was not being used
> inside this method. This commit removes this unused variable.
> 
> Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
> ---
>  src/util/virfile.c | 1 -
>  1 file changed, 1 deletion(-)

Reviewed-by: Roman Bogorodskiy <bogorodskiy@gmail.com>

And pushed.

> diff --git a/src/util/virfile.c b/src/util/virfile.c
> index 6b94885a87..1faeebbdb5 100644
> --- a/src/util/virfile.c
> +++ b/src/util/virfile.c
> @@ -4228,7 +4228,6 @@ int
>  virFileReadValueString(char **value, const char *format, ...)
>  {
>      int ret;
> -    VIR_AUTOFREE(char *) str = NULL;
>      VIR_AUTOFREE(char *) path = NULL;
>      va_list ap;
>  
> -- 
> 2.17.1
> 
> --
> libvir-list mailing list
> libvir-list@redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list

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