[pango/more-test-coverage: 4/8] layout: Correct a g_return_val_if_fail




commit f5fa9600815ad319aad30d6e486e149a0e45511f
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Jul 5 22:42:33 2021 -0400

    layout: Correct a g_return_val_if_fail
    
    The convention is to return the initial value if
    the 'this' check fails. Correct this for auto_dir.

 pango/pango-layout.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index f6ce8ad6..93dcadbc 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -868,7 +868,7 @@ pango_layout_set_auto_dir (PangoLayout *layout,
 gboolean
 pango_layout_get_auto_dir (PangoLayout *layout)
 {
-  g_return_val_if_fail (PANGO_IS_LAYOUT (layout), FALSE);
+  g_return_val_if_fail (PANGO_IS_LAYOUT (layout), TRUE);
 
   return layout->auto_dir;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]