[PATCH v2] Rewrite fsck.c:fsck_commit() replace memcmp() with starts_with()

2014-03-21 Thread blacksimit
From: Oguzhan Unlu cengoguzhanu...@gmail.com My solution to make lines containing buffer += a_number; clearer to anyone is following; I defined a new int, magic_num, then assigned lengths of used strings to magic_num and then changed assignment lines through using magic_num so that where the

Re: [PATCH v2] Rewrite fsck.c:fsck_commit() replace memcmp() with starts_with()

2014-03-21 Thread Junio C Hamano
blacksimit cengoguzhanu...@gmail.com writes: From: Oguzhan Unlu cengoguzhanu...@gmail.com My solution to make lines containing buffer += a_number; clearer to anyone is following; I defined a new int, magic_num, then assigned lengths of used strings to magic_num and then changed assignment

Re: [PATCH v2] Rewrite fsck.c:fsck_commit() replace memcmp() with starts_with()

2014-03-21 Thread Matthieu Moy
blacksimit cengoguzhanu...@gmail.com writes: - +int magic_num; + +magic_num = strlen(tree ); /* magic_num is 5 */ if (!starts_with(buffer, tree )) Whitespace damage. It seems you have set your tab-width to something other than 8, and indented with spaces. Please don't do

Re: [PATCH v2] Rewrite fsck.c:fsck_commit() replace memcmp() with starts_with()

2014-03-21 Thread Eric Sunshine
In addition to the valuable review comments by Junio and Matthieu, see a few more below... On Fri, Mar 21, 2014 at 12:37 PM, blacksimit cengoguzhanu...@gmail.com wrote: From: Oguzhan Unlu cengoguzhanu...@gmail.com My solution to make lines containing buffer += a_number; clearer to anyone is