[pango] Don't check array for NULL
- From: Ting-Wei Lan <lantw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango] Don't check array for NULL
- Date: Tue, 18 Jul 2017 14:59:40 +0000 (UTC)
commit 2e107ff2323ba2ede1c864d25e5f34ae054852ba
Author: Ting-Wei Lan <lantw src gnome org>
Date: Mon Jun 5 21:30:08 2017 +0800
Don't check array for NULL
Arrays can never be NULL, and doing unnecessary checking causes
compilers to show warnings.
https://bugzilla.gnome.org/show_bug.cgi?id=783428
pango/fonts.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/pango/fonts.c b/pango/fonts.c
index 887f03c..49e035b 100644
--- a/pango/fonts.c
+++ b/pango/fonts.c
@@ -1188,7 +1188,7 @@ append_field (GString *str, const char *what, const FieldMap *map, int n_element
if (map[i].value != val)
continue;
- if (G_LIKELY (map[i].str && map[i].str[0]))
+ if (G_LIKELY (map[i].str[0]))
{
if (G_LIKELY (str->len > 0 && str->str[str->len -1] != ' '))
g_string_append_c (str, ' ');
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]