[PATCH] GSoC Miniproject 15. Rewrite fsck.c:fsck_commit()

2014-03-20 Thread Ashwin Jha
. The current task can be easily done by providing offsets to the buffer pointer (the way it is implemented currently). Signed-off-by: Ashwin Jha --- fsck.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/fsck.c b/fsck.c index 64bf279..82e1640 100644 --- a/fsck.c

Re: [PATCH] GSoC Miniproject 15. Rewrite fsck.c:fsck_commit()

2014-03-21 Thread Ashwin Jha
Original Message Subject:[PATCH] GSoC Miniproject 15. Rewrite fsck.c:fsck_commit() Date: Fri, 21 Mar 2014 07:24:46 +0530 From: Ashwin Jha To: git@vger.kernel.org CC: Ashwin Jha modified fsck.c:fsck_commit(). Replaced memcmp() with starts_with() function

Re: [PATCH] GSoC Miniproject 15. Rewrite fsck.c:fsck_commit()

2014-03-21 Thread Ashwin Jha
On 03/22/2014 12:11 AM, Eric Sunshine wrote: On Fri, Mar 21, 2014 at 5:18 AM, Ashwin Jha wrote: On Fri, Mar 21, 2014 at 9:03 AM, Eric Sunshine wrote: On Thu, Mar 20, 2014 at 9:54 PM, Ashwin Jha wrote: Subject: [PATCH] GSoC Miniproject 15. Rewrite fsck.c:fsck_commit() starts_with() seems

[PATCH] Modify fsck_commit. Replace memcmp by skip_prefix

2014-03-22 Thread Ashwin Jha
Replace memcmp by skip_prefix as it serves the dual purpose of checking the string for a prefix as well as skipping that prefix. Signed-off-by: Ashwin Jha --- fsck.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/fsck.c b/fsck.c index 64bf279

Re: [PATCH] Modify fsck_commit. Replace memcmp by skip_prefix

2014-03-23 Thread Ashwin Jha
Thanks for your comments, Tanay and Eric. Regarding the [PATCH v2], I will keep this in mind for the subsequent patches. On 03/23/2014 02:10 PM, Eric Sunshine wrote: Thanks for the resubmission. Comments below... On Sat, Mar 22, 2014 at 11:12 AM, Ashwin Jha wrote: Subject: [PATCH] Modify

[PATCH v3 1/2] fsck.c: modify fsck_ident() and fsck_commit()

2014-03-24 Thread Ashwin Jha
In fsck_ident(): Replace argument char **ident with const char **ident In fsck_commit(): Replace char *buffer with const char *buffer In both the cases, referenced memory addresses are not modified. So, it will be a good practice, to declare them as const. Signed-off-by: Ashwin Jha --- Change

[PATCH v3 2/2] fsck.c:fsck_commit replace memcmp by skip_prefix

2014-03-24 Thread Ashwin Jha
Replace memcmp by skip_prefix as it serves the dual purpose of checking the string for a prefix as well as skipping that prefix. Signed-off-by: Ashwin Jha --- fsck_commit(): After the first patch in this series, it is now safe to replace memcmp() with skip_prefix(). Previous versions can be