cli: avoid passing full NmCli global variable to nm_cli_spawn_pager()
We should not use global variables, and we should minimize the state that we pass around. Instead of requiring the full NmCli struct in nm_cli_spawn_pager(), pass only the necessary data. This reduces our use of global variables.
This commit is contained in:
@@ -1587,7 +1587,7 @@ print_required_fields (const NmcConfig *nmc_config,
|
||||
gboolean field_names = of_flags & NMC_OF_FLAG_FIELD_NAMES;
|
||||
gboolean section_prefix = of_flags & NMC_OF_FLAG_SECTION_PREFIX;
|
||||
|
||||
nm_cli_spawn_pager (&nm_cli);
|
||||
nm_cli_spawn_pager (nmc_config, &nm_cli.pager_data);
|
||||
|
||||
/* --- Main header --- */
|
||||
if ( nmc_config->print_output == NMC_PRINT_PRETTY
|
||||
|
Reference in New Issue
Block a user