On Mon, 27 Aug 2007, Nigel Horne wrote:
> The length of the string is calculated twice, once by strlen and once (by
> implication of
> looking for the NUL terminator) by strcpy.
> Better to calculated it once and remember:
Correct. I have modified pen_strdup as suggested.
It is not necessary to check the return value from pen_malloc,
since it will never return NULL.
Received on Wed Aug 29 2007 - 11:11:57 CEST
This archive was generated by hypermail 2.2.0 : Wed Aug 29 2007 - 11:11:59 CEST