The @-parsing loop unnecessarily checks for the sequence "@{" from
len - 2 unnecessarily. We can safely check from len - 4: write out a
comment justifying this.
Signed-off-by: Ramkumar Ramachandra
---
sha1_name.c | 18 +-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --g
On Wed, May 1, 2013 at 11:20 AM, Ramkumar Ramachandra
wrote:
> The @-parsing loop unnecessarily checks for the sequence "@{" from
> len - 2 unnecessarily. We can safely check from len - 4: write out a
> comment justifying this.
>
> Signed-off-by: Ramkumar Ramachandra
> ---
> sha1_name.c | 18 ++
Felipe Contreras wrote:
> I think this comment is overkill.
That's not for one line. It's for the whole logic following it: there
are things like (len-1) - (at+2) which are easy to visualize with this
picture. They're int, not char *.
--
To unsubscribe from this list: send the line "unsubscribe
Felipe Contreras writes:
> On Wed, May 1, 2013 at 11:20 AM, Ramkumar Ramachandra
> wrote:
>> The @-parsing loop unnecessarily checks for the sequence "@{" from
>> len - 2 unnecessarily. We can safely check from len - 4: write out a
>> comment justifying this.
>>
>> Signed-off-by: Ramkumar Ramac
4 matches
Mail list logo