Re: [PATCH] create a kstrdup library function

From: Andres Salomon
Date: Mon Apr 04 2005 - 18:14:08 EST


On Mon, 04 Apr 2005 20:44:17 +0100, Paulo Marques wrote:

>
> Hi,
>
> This patch creates a new kstrdup library function and changes the
> "local" implementations in several places to use this function.
>
> This is just a cleanup to allow reusing the strdup code, and to prevent
> bugs in future duplications of strdup.
>

Just a minor nit; I would use a size_t in kstrdup(),
instead of an int, for the len. All other functions dealing w/ the len
(strlen, kmalloc, memcpy) expect a size_t.




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