Messages in this thread | | | Subject | Re: generic strncpy - off-by-one error | From | Alan Cox <> | Date | 12 Aug 2003 18:14:20 +0100 |
| |
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/
| |