[glib: 2/3] gdate: Add an assertion to help static analysis
- From: Sebastian Dröge <sdroege src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 2/3] gdate: Add an assertion to help static analysis
- Date: Thu, 5 May 2022 12:27:19 +0000 (UTC)
commit c7c530c3b8ed539fab2a8dfbab6bda239269731e
Author: Philip Withnall <pwithnall endlessos org>
Date: Thu May 5 11:23:49 2022 +0100
gdate: Add an assertion to help static analysis
Signed-off-by: Philip Withnall <pwithnall endlessos org>
Coverity CID: #1486833
glib/gdate.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/glib/gdate.c b/glib/gdate.c
index 68c8689ef4..a508c48057 100644
--- a/glib/gdate.c
+++ b/glib/gdate.c
@@ -2725,6 +2725,8 @@ g_date_strftime (gchar *s,
g_warning (G_STRLOC "Error converting results of strftime to UTF-8: %s", error->message);
g_error_free (error);
+ g_assert (convbuf == NULL);
+
s[0] = '\0';
return 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]