Commit 2e974baa authored by Thomas Haller's avatar Thomas Haller

cli: use nm_clear_g_source() util in quit() functions

parent 199525ba
...@@ -502,12 +502,8 @@ usage_connection_export (void) ...@@ -502,12 +502,8 @@ usage_connection_export (void)
static void static void
quit (void) quit (void)
{ {
if (progress_id) { if (nm_clear_g_source (&progress_id))
g_source_remove (progress_id);
progress_id = 0;
nmc_terminal_erase_line (); nmc_terminal_erase_line ();
}
g_main_loop_quit (loop); g_main_loop_quit (loop);
} }
......
...@@ -451,11 +451,8 @@ usage_device_lldp (void) ...@@ -451,11 +451,8 @@ usage_device_lldp (void)
static void static void
quit (void) quit (void)
{ {
if (progress_id) { if (nm_clear_g_source (&progress_id))
g_source_remove (progress_id);
nmc_terminal_erase_line (); nmc_terminal_erase_line ();
}
g_main_loop_quit (loop); g_main_loop_quit (loop);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment