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 722256 - gslist: Simplified node removal and got rid of some code duplication
gslist: Simplified node removal and got rid of some code duplication
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2014-01-15 11:20 UTC by christian.h.m.schramm
Modified: 2017-09-12 11:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gslist: Simplified node removal and got rid of some code duplication (3.15 KB, patch)
2014-01-15 11:20 UTC, christian.h.m.schramm
committed Details | Review

Description christian.h.m.schramm 2014-01-15 11:20:35 UTC
Merged two almost identical functions for removing at most one
or all nodes containing some data. Also simplified the code a bit
by using a pointer to a pointer (see
http://wordaligned.org/articles/two-star-programming).
Comment 1 christian.h.m.schramm 2014-01-15 11:20:37 UTC
Created attachment 266347 [details] [review]
gslist: Simplified node removal and got rid of some code duplication
Comment 2 christian.h.m.schramm 2014-02-11 17:26:17 UTC
ping – anything wrong with it? Or is gslist unmaintained?
Comment 3 Philip Withnall 2017-09-12 11:07:24 UTC
Review of attachment 266347 [details] [review]:

Looks good to me, modulo a couple of nitpicks.

::: glib/gslist.c
@@ +439,3 @@
                 gconstpointer  data)
 {
+  return _g_slist_remove_data(list, data, FALSE);

Nitpick: Should be a space before `(`.

@@ +458,3 @@
                     gconstpointer  data)
 {
+  return _g_slist_remove_data(list, data, TRUE);

Nitpick: Should be a space before `(`.
Comment 4 Philip Withnall 2017-09-12 11:11:49 UTC
Pushed with fixes for the nitpicks.

Attachment 266347 [details] pushed as 54e3ed1 - gslist: Simplified node removal and got rid of some code duplication