GNOME Bugzilla – Bug 648516
Little comment error and 2 useless lines of code
Last modified: 2011-11-30 03:22:27 UTC
Hi! I'm studying the gtree.c file in order to see how the GTree structure is implemented and to understand how the algorithmes work. If I'm not mistaken the comment at the line 97 (/* height (left) - height (right) */) is wrong: according to the algorithmes it should be /* height (right) - height (left) */. I've also noticed that the 2 lines of code respectively at line 1256 (node->right = right;) and line 1298 (node->left = left;) are useless because they don't do anything (if I'm not mistaken). I can provide you with a patch if you want. Bye!
I think you are correct.
Patch welcome - also see http://live.gnome.org/GnomeLove/SubmittingPatches
Created attachment 192609 [details] [review] Patch that fixes the comment error
Created attachment 192610 [details] [review] Patch that removes the two useless lines of code
Here are the patches. I hope I did it the right way (I've followed tour link).
Hi Matthias, could you review the patches attached ? Thanks
The patches look fine.
The following fixes have been pushed: 22748db Remove two useless lines of code 27e7080 Fix a little comment error in the _GTreeNode struct
Created attachment 202417 [details] [review] Remove two useless lines of code
Created attachment 202418 [details] [review] Fix a little comment error in the _GTreeNode struct