[libvirt] [PATCH 08/10] tools: vshCommandArgvGetArg: prefer g_strdup

Ján Tomko jtomko at redhat.com
Fri Oct 18 22:37:52 UTC 2019


Remove the use of vshStrdup.

Signed-off-by: Ján Tomko <jtomko at redhat.com>
---
 tools/vsh.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/vsh.c b/tools/vsh.c
index fccd4cd36d..9ee3f99ff3 100644
--- a/tools/vsh.c
+++ b/tools/vsh.c
@@ -1644,7 +1644,7 @@ vshCommandParse(vshControl *ctl, vshCommandParser *parser, vshCmd **partial)
  */
 
 static vshCommandToken ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
-vshCommandArgvGetArg(vshControl *ctl,
+vshCommandArgvGetArg(vshControl *ctl G_GNUC_UNUSED,
                      vshCommandParser *parser,
                      char **res,
                      bool report G_GNUC_UNUSED)
@@ -1654,7 +1654,7 @@ vshCommandArgvGetArg(vshControl *ctl,
         return VSH_TK_END;
     }
 
-    *res = vshStrdup(ctl, *parser->arg_pos);
+    *res = g_strdup(*parser->arg_pos);
     parser->arg_pos++;
     return VSH_TK_ARG;
 }
-- 
2.21.0




More information about the libvir-list mailing list