Fix return values of non-void functions.
authorLeif Middelschulte <leif.middelschulte@gmail.com>
Wed, 22 Feb 2012 00:02:58 +0000 (00:02 +0000)
committerLeif Middelschulte <leif.middelschulte@gmail.com>
Wed, 22 Feb 2012 00:02:58 +0000 (00:02 +0000)
SVN revision: 68241

src/bin/e_randr.c
src/bin/e_randr_11.c
src/bin/e_randr_12.c

index 21d215c..3787243 100644 (file)
@@ -99,9 +99,9 @@ _screen_info_refresh(void)
    Ecore_X_Window root;
    int n;
 
-   EINA_SAFETY_ON_FALSE_RETURN(ecore_x_randr_query());
+   EINA_SAFETY_ON_FALSE_RETURN_VAL(ecore_x_randr_query(), EINA_FALSE);
 
-   if (!(roots = ecore_x_window_root_list(&n))) return;
+   if (!(roots = ecore_x_window_root_list(&n))) return EINA_FALSE;
    /* first (and only) root window */
    root = roots[0];
    free(roots);
index 0e9b4b8..3f9fcaf 100644 (file)
@@ -96,8 +96,10 @@ _11_screen_info_free(E_Randr_Screen_Info_11 *screen_info)
 Eina_Bool
 _11_screen_info_refresh(void)
 {
-   EINA_SAFETY_ON_TRUE_RETURN(E_RANDR_11_NO);
+   EINA_SAFETY_ON_TRUE_RETURN_VAL(E_RANDR_11_NO, EINA_FALSE);
 
    _11_screen_info_free(e_randr_screen_info.rrvd_info.randr_info_11);
-   return ((e_randr_screen_info.rrvd_info.randr_info_11 = _11_screen_info_new()));
+   e_randr_screen_info.rrvd_info.randr_info_11 = _11_screen_info_new();
+
+   return (e_randr_screen_info.rrvd_info.randr_info_11 != NULL);
 }
index 75b33c4..07c653c 100644 (file)
@@ -303,7 +303,7 @@ _mode_geo_identical_find(Eina_List *modes, Ecore_X_Randr_Mode_Info *mode)
    Eina_Bool
 _12_screen_info_refresh(void)
 {
-   EINA_SAFETY_ON_TRUE_RETURN(e_randr_screen_info.randr_version < ECORE_X_RANDR_1_2);
+   EINA_SAFETY_ON_TRUE_RETURN_VAL((e_randr_screen_info.randr_version < ECORE_X_RANDR_1_2), EINA_FALSE);
 
    if (e_randr_screen_info.rrvd_info.randr_info_12)
      _12_screen_info_free(e_randr_screen_info.rrvd_info.randr_info_12);
@@ -312,6 +312,8 @@ _12_screen_info_refresh(void)
      return EINA_FALSE;
 
    _screen_primary_output_assign(NULL);
+
+   return EINA_TRUE;
 }
 
 /******************************************************************