[gnome-control-center/gnome-3-8] rfkill-glib: Don't use g_assert_not_reached in type_to_string
- From: Adel Gadllah <agadllah src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/gnome-3-8] rfkill-glib: Don't use g_assert_not_reached in type_to_string
- Date: Thu, 16 May 2013 13:50:34 +0000 (UTC)
commit 3da204d445a0708c3cba5bfd89487b041f5db0d3
Author: Adel Gadllah <adel gadllah gmail com>
Date: Thu May 16 15:41:17 2013 +0200
rfkill-glib: Don't use g_assert_not_reached in type_to_string
New kernel versions can add new RFKILL types, we should now crash here,
just say that we don't know what the switch is.
panels/network/rfkill-glib.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/panels/network/rfkill-glib.c b/panels/network/rfkill-glib.c
index e27ca40..7c9ee3c 100644
--- a/panels/network/rfkill-glib.c
+++ b/panels/network/rfkill-glib.c
@@ -80,7 +80,7 @@ type_to_string (unsigned int type)
case RFKILL_TYPE_WWAN:
return "WWAN";
default:
- g_assert_not_reached ();
+ return "UNKNOWN";
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]