After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 778654 - pango: Remove some unnecessary NULL checks
pango: Remove some unnecessary NULL checks
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: pango-maint
pango-maint
Depends on:
Blocks:
 
 
Reported: 2017-02-15 09:59 UTC by Philip Withnall
Modified: 2017-02-16 10:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
pango: Remove some unnecessary NULL checks (1.70 KB, patch)
2017-02-15 10:00 UTC, Philip Withnall
committed Details | Review

Description Philip Withnall 2017-02-15 09:59:58 UTC
Trivial patch to remove some redundant code.
Comment 1 Philip Withnall 2017-02-15 10:00:03 UTC
Created attachment 345789 [details] [review]
pango: Remove some unnecessary NULL checks

These checks are preceded by other checks or code which demonstrates
that the values are definitely always non-NULL.

In the case of pango_attr_list_insert_internal(), the final branch of
the function never needs to update list->attributes_tail, as the middle
branch handles the case of appending to the list. The final case is just
for insertions in the middle of the list.

Coverity IDs: 1391710, 1391711

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Comment 2 Matthias Clasen 2017-02-15 15:09:39 UTC
Review of attachment 345789 [details] [review]:

ok
Comment 3 Philip Withnall 2017-02-16 10:47:06 UTC
Attachment 345789 [details] pushed as 4cd190e - pango: Remove some unnecessary NULL checks