[lkml]   [2003]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: generic strncpy - off-by-one error
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
More majordomo info at
Please read the FAQ at

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