[glib] gerror: Mention that g_clear_error can be used with an "empty" GError
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gerror: Mention that g_clear_error can be used with an "empty" GError
- Date: Thu, 10 Mar 2016 08:11:30 +0000 (UTC)
commit 4569161f81e9338bb91e5a64fd1d00665bcb19e6
Author: Stephan Hesse <stephan soundcloud com>
Date: Tue Sep 29 17:50:39 2015 +0200
gerror: Mention that g_clear_error can be used with an "empty" GError
It is fine to do:
GError *error = NULL;
g_clear_error (&error);
https://bugzilla.gnome.org/show_bug.cgi?id=762937
glib/gerror.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/glib/gerror.c b/glib/gerror.c
index 7c72d2b..380382b 100644
--- a/glib/gerror.c
+++ b/glib/gerror.c
@@ -663,7 +663,7 @@ g_propagate_error (GError **dest,
* g_clear_error:
* @err: a #GError return location
*
- * If @err is %NULL, does nothing. If @err is non-%NULL,
+ * If @err or * err is %NULL, does nothing. Otherwise,
* calls g_error_free() on * err and sets * err to %NULL.
*/
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]