[libvirt] [PATCH 04/11] vsh: Fix vshCompleter signature

Michal Privoznik mprivozn at redhat.com
Tue Nov 7 12:22:52 UTC 2017


The first argument passed to this function is vshControl *.
There's no need to use void pointer.

Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
---
 tools/vsh.c | 2 +-
 tools/vsh.h | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/vsh.c b/tools/vsh.c
index 83c96e1a8..cbab6f7d0 100644
--- a/tools/vsh.c
+++ b/tools/vsh.c
@@ -66,7 +66,7 @@
 
 #ifdef WITH_READLINE
 /* For autocompletion */
-void *autoCompleteOpaque;
+vshControl *autoCompleteOpaque;
 #endif
 
 /* NOTE: It would be much nicer to have these two as part of vshControl
diff --git a/tools/vsh.h b/tools/vsh.h
index c411c2ca4..1ebd5c11a 100644
--- a/tools/vsh.h
+++ b/tools/vsh.h
@@ -123,7 +123,8 @@ typedef struct _vshCmdOpt vshCmdOpt;
 typedef struct _vshCmdOptDef vshCmdOptDef;
 typedef struct _vshControl vshControl;
 
-typedef char **(*vshCompleter)(void *opaque, unsigned int flags);
+typedef char **(*vshCompleter)(vshControl *ctl,
+                               unsigned int flags);
 
 /*
  * vshCmdInfo -- name/value pair for information about command
-- 
2.13.6




More information about the libvir-list mailing list