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 622480 - Improve documentation for g_strcmp0()
Improve documentation for g_strcmp0()
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: docs
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2010-06-23 10:21 UTC by Milan Bouchet-Valat
Modified: 2010-06-23 13:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Improve documentation for g_strcmp0() (845 bytes, patch)
2010-06-23 10:21 UTC, Milan Bouchet-Valat
none Details | Review

Description Milan Bouchet-Valat 2010-06-23 10:21:14 UTC
It may seems obvious, but I had to check to code to be sure NULL == NULL. Of course, seems to hard to return somthing else, but better tell it explicitly. Most people will use plain strcmp() with hacks rather than read the code, if in doubt.
Comment 1 Milan Bouchet-Valat 2010-06-23 10:21:16 UTC
Created attachment 164380 [details] [review]
Improve documentation for g_strcmp0()

Be more explicit about the handling of two NULL pointers.
Comment 2 Christian Dywan 2010-06-23 12:35:20 UTC
I agree it isn't obvious from the wording, thanks for the patch. Note fore the future that NULL needs to be written %NULL in gtk-doc comments.
Comment 3 Milan Bouchet-Valat 2010-06-23 13:08:23 UTC
Oops, indeed! The simpler the fix seems, the more you're likely to introduce mistakes... ;-)