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 738052 - Remove Unnecessary Null check in xpointer.c
Remove Unnecessary Null check in xpointer.c
Status: RESOLVED FIXED
Product: libxml2
Classification: Platform
Component: general
git master
Other Linux
: Normal major
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2014-10-07 04:08 UTC by Gaurav
Modified: 2014-10-07 09:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Remove Unnecessary Null check in xpointer.c (401 bytes, patch)
2014-10-07 04:08 UTC, Gaurav
none Details | Review

Description Gaurav 2014-10-07 04:08:26 UTC
Created attachment 287900 [details] [review]
Remove Unnecessary Null check in xpointer.c

In function: xmlXPtrMatchString
2456     if (string == NULL)
2457         return(-1);
2458     if ((start == NULL) || (start->type == XML_NAMESPACE_DECL))
2459         return(-1);
2460     if ((end == NULL) || (*end == NULL) ||
2461         ((*end)->type == XML_NAMESPACE_DECL) || (endindex == NULL))
2462         return(-1);
2463     cur = start;

In above code, start already checked against NULL and assign to cur.
So no need to add Null check again on cur.

Please apply the patch.
Comment 1 Daniel Veillard 2014-10-07 09:04:11 UTC
Okay, applied and pushed to git upstream,

  thanks !

Daniel