lkml.org 
[lkml]   [2003]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: generic strncpy - off-by-one error
From
Date
On Maw, 2003-08-12 at 02:56, Anthony Truong wrote:
> Thanks for pointing that out to me. However, I don't think the kernel
> strncpy implementation is exactly the same as that of Standard C lib

It is true it doesnt need to be

> implementation. Iwas just looking at it from the kernel code context.
> There's a point in doing it the "kernel" way, to save precious CPU
> cycles from being wasted otherwise.

CPU cycles, got lots of those 8). If its going to do anything it might
be to reference an extra cache line. For people who dont need padding
2.6 has strlcpy. Lots of drivers assume strncpy fills the entire block

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:47    [W:0.039 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site