From 321f91407107a0c83fcfa32d7550f4371ec76918 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Mon, 18 Feb 2019 13:23:13 +0000 Subject: [PATCH] gerror: Add a missing precondition assertion in documentation Inspired by !673. Signed-off-by: Philip Withnall --- 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; *