[glib: 1/2] gerror: Add a missing precondition assertion in documentation



commit 321f91407107a0c83fcfa32d7550f4371ec76918
Author: Philip Withnall <withnall endlessm com>
Date:   Mon Feb 18 13:23:13 2019 +0000

    gerror: Add a missing precondition assertion in documentation
    
    Inspired by !673.
    
    Signed-off-by: Philip Withnall <withnall endlessm com>

 glib/gerror.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/glib/gerror.c b/glib/gerror.c
index 236e52869..b190d6881 100644
--- a/glib/gerror.c
+++ b/glib/gerror.c
@@ -126,6 +126,8 @@
  *   gint fd;
  *   int saved_errno;
  *
+ *   g_return_val_if_fail (error == NULL || *error == NULL, -1);
+ *
  *   fd = open ("file.txt", O_RDONLY);
  *   saved_errno = errno;
  *


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