From 1f3f9c81dad7c6c017164e42afa882e6dbe6b472 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Thu, 14 Mar 2024 22:22:08 +0100 Subject: [PATCH] virsh: Inline VIRSH_COMMON_OPT_NETWORK_OT_STRING macro MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The macro is used in just one place and the definition of the option is going to be modified. Inline the macro. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- tools/virsh-network.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/tools/virsh-network.c b/tools/virsh-network.c index 597e3d4530..240d10eea7 100644 --- a/tools/virsh-network.c +++ b/tools/virsh-network.c @@ -43,17 +43,6 @@ #define VIRSH_COMMON_OPT_NETWORK_FULL(cflags) \ VIRSH_COMMON_OPT_NETWORK(N_("network name or uuid"), cflags) -#define VIRSH_COMMON_OPT_NETWORK_OT_STRING(_helpstr, cflags) \ - {.name = "network", \ - .type = VSH_OT_STRING, \ - .help = _helpstr, \ - .completer = virshNetworkNameCompleter, \ - .completer_flags = cflags, \ - } - -#define VIRSH_COMMON_OPT_NETWORK_OT_STRING_FULL(cflags) \ - VIRSH_COMMON_OPT_NETWORK_OT_STRING(N_("network name or uuid"), cflags) - #define VIRSH_COMMON_OPT_NETWORK_PORT(cflags) \ {.name = "port", \ .type = VSH_OT_STRING, \ @@ -1587,7 +1576,11 @@ static const vshCmdInfo info_network_event = { }; static const vshCmdOptDef opts_network_event[] = { - VIRSH_COMMON_OPT_NETWORK_OT_STRING(N_("filter by network name or uuid"), 0), + {.name = "network", + .type = VSH_OT_STRING, + .help = N_("filter by network name or uuid"), + .completer = virshNetworkNameCompleter, + }, {.name = "event", .type = VSH_OT_STRING, .completer = virshNetworkEventNameCompleter,