[gnome-bluetooth] rfkill-glib: Don't use g_assert_not_reached in type_to_string



commit 9932a6316be777d47b89323c9b8ae132c3676830
Author: Adel Gadllah <adel gadllah gmail com>
Date:   Thu May 16 15:31: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.

 lib/rfkill-glib.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/lib/rfkill-glib.c b/lib/rfkill-glib.c
index 039e80a..6f15702 100644
--- a/lib/rfkill-glib.c
+++ b/lib/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]