summary refs log tree commit diff
path: root/src/nmtui
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2022-05-04 15:35:24 +0200
committerMichael Biebl <biebl@debian.org>2022-05-04 15:35:24 +0200
commit9959fdb2e8ddd06f2161798ca0a39c77d67c652d (patch)
tree2ce24a336d2b1c5fd5dec3090db312eded6c78ba /src/nmtui
parent8c623dddbdebe354cb94bfc559a5371a14865317 (diff)
New upstream version 1.37.92 upstream/1.37.92
Diffstat (limited to 'src/nmtui')
-rw-r--r--src/nmtui/nmt-address-list.c15
-rw-r--r--src/nmtui/nmt-editor-grid.c2
-rw-r--r--src/nmtui/nmt-editor.c2
-rw-r--r--src/nmtui/nmt-mac-entry.h6
4 files changed, 13 insertions, 12 deletions
diff --git a/src/nmtui/nmt-address-list.c b/src/nmtui/nmt-address-list.c
index 1678f33f..dba8e790 100644
--- a/src/nmtui/nmt-address-list.c
+++ b/src/nmtui/nmt-address-list.c
@@ -121,19 +121,20 @@ nmt_address_list_create_widget(NmtWidgetList *list, int num)
     NmtAddressListPrivate *priv = NMT_ADDRESS_LIST_GET_PRIVATE(list);
     NmtNewtWidget         *entry;
 
-    if (priv->list_type == NMT_ADDRESS_LIST_IP4_WITH_PREFIX)
+    if (priv->list_type == NMT_ADDRESS_LIST_IP4_WITH_PREFIX) {
         entry = nmt_ip_entry_new(25, AF_INET, TRUE, FALSE);
-    else if (priv->list_type == NMT_ADDRESS_LIST_IP4)
+    } else if (priv->list_type == NMT_ADDRESS_LIST_IP4) {
         entry = nmt_ip_entry_new(25, AF_INET, FALSE, FALSE);
-    else if (priv->list_type == NMT_ADDRESS_LIST_IP6_WITH_PREFIX)
+    } else if (priv->list_type == NMT_ADDRESS_LIST_IP6_WITH_PREFIX) {
         entry = nmt_ip_entry_new(25, AF_INET6, TRUE, FALSE);
-    else if (priv->list_type == NMT_ADDRESS_LIST_IP6)
+    } else if (priv->list_type == NMT_ADDRESS_LIST_IP6) {
         entry = nmt_ip_entry_new(25, AF_INET6, FALSE, FALSE);
-    else if (priv->list_type == NMT_ADDRESS_LIST_HOSTNAME) {
+    } else if (priv->list_type == NMT_ADDRESS_LIST_HOSTNAME) {
         entry = nmt_newt_entry_new(25, NMT_NEWT_ENTRY_NONEMPTY);
         nmt_newt_entry_set_filter(NMT_NEWT_ENTRY(entry), hostname_filter, list);
-    } else
-        g_assert_not_reached();
+    } else {
+        g_return_val_if_reached(NULL);
+    }
 
     g_object_bind_property_full(list,
                                 "strings",
diff --git a/src/nmtui/nmt-editor-grid.c b/src/nmtui/nmt-editor-grid.c
index bb257805..b4beda92 100644
--- a/src/nmtui/nmt-editor-grid.c
+++ b/src/nmtui/nmt-editor-grid.c
@@ -232,7 +232,7 @@ nmt_editor_grid_get_components(NmtNewtWidget *widget)
 
         if (rows[i].label) {
             child_cos = nmt_newt_widget_get_components(rows[i].label);
-            g_assert(child_cos[0] && !child_cos[1]);
+            g_return_val_if_fail(child_cos[0] && !child_cos[1], NULL);
             g_ptr_array_add(cos, child_cos[0]);
             g_free(child_cos);
         }
diff --git a/src/nmtui/nmt-editor.c b/src/nmtui/nmt-editor.c
index 8e6a760c..427ac017 100644
--- a/src/nmtui/nmt-editor.c
+++ b/src/nmtui/nmt-editor.c
@@ -377,7 +377,7 @@ nmt_editor_constructed(GObject *object)
     else if (nm_connection_is_type(priv->edit_connection, NM_SETTING_WIREGUARD_SETTING_NAME))
         page = nmt_page_wireguard_new(priv->edit_connection, deventry);
     else
-        g_assert_not_reached();
+        g_return_if_reached();
 
     add_sections_for_page(editor, grid, page);
     nmt_editor_grid_append(grid, NULL, nmt_newt_separator_new(), NULL);
diff --git a/src/nmtui/nmt-mac-entry.h b/src/nmtui/nmt-mac-entry.h
index 0ed5a28c..de44fb9d 100644
--- a/src/nmtui/nmt-mac-entry.h
+++ b/src/nmtui/nmt-mac-entry.h
@@ -9,9 +9,9 @@
 #include "nm-utils.h"
 #include "libnmt-newt/nmt-newt.h"
 
-typedef enum { /*< skip >*/
-               NMT_MAC_ENTRY_TYPE_MAC,
-               NMT_MAC_ENTRY_TYPE_CLONED,
+typedef enum {
+    NMT_MAC_ENTRY_TYPE_MAC,
+    NMT_MAC_ENTRY_TYPE_CLONED,
 } NmtMacEntryType;
 
 #define NMT_TYPE_MAC_ENTRY (nmt_mac_entry_get_type())