2010/8/26 Mike Frysinger <[email protected]>:
> On Thursday, August 26, 2010 06:20:43 Frans Meulenbroeks wrote:
>> @@ -143,11 +143,12 @@ COMMENT         (!.*)|("//".*)[^\n]
>>       This is enabled with <expect_vector>. */
>>    /* token is a vector string */
>>    char *cstring;
>> +  int len;
>>
>>    fix_yylloc_nl(yylloc, yytext, yyget_extra(yyscanner));
>> -  align_string(yytext);
>> +  len = align_string(yytext);
>>
>> -  cstring = malloc(strlen(yytext) + 1);
>> +  cstring = malloc(len + 1);
>>    strcpy(cstring, yytext);
>>    yylval->cvalue = cstring;
>
> we know the length, so let's change strcpy() to memcpy() while we're here (and
> in the other places too)
> -mike
>
Oops, did the reply instead of reply-all thing again.
Can't we have reply to the list as default?

Anyway: my msg:
Is that a request to me or a note to self ?
memcpy might make a marginal difference if it is clever enough to to
go longword copy where possible.

------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
UrJTAG-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/urjtag-development

Reply via email to