[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] maint: replace a use of strcpy in chmod.c with memcpy
From: |
Pádraig Brady |
Subject: |
Re: [PATCH] maint: replace a use of strcpy in chmod.c with memcpy |
Date: |
Mon, 16 Apr 2012 17:55:36 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0 |
On 04/16/2012 04:45 PM, Jim Meyering wrote:
> This is on the edge...
> I generally prefer to use memcpy when the length is already computed,
> so I propose to do that here. However, this is certainly not
> performance sensitive, and the strcpy invocation is slightly simpler
> and hence a little more readable. Opinions?
Yep please apply.
When I see code like this I waste time looking
at it to see why the more efficient path wasn't chosen.
Of if I'm really busy assume the more efficient path
can't be used and perpetuate the inefficiency.
cheers,
Pádraig.