From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Tue, 1 Apr 2014 11:16:07 +0200 Subject: [U-Boot] [PATCH v12 1/8] libc: move strlcpy() from ether.c to string.c In-Reply-To: <1396342019-644-2-git-send-email-dantesu@gmail.com> References: <1396342019-644-1-git-send-email-dantesu@gmail.com> <1396342019-644-2-git-send-email-dantesu@gmail.com> Message-ID: <201404011116.07196.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tuesday, April 01, 2014 at 10:46:52 AM, Kuo-Jung Su wrote: > From: Kuo-Jung Su > > It would be better to have strlcpy() moved to lib/string.c, > so that it could be reused by others without enabling > USB Gadget Ethernet. > > Signed-off-by: Kuo-Jung Su > CC: Albert Aribaud > CC: Wolfgang Denk > Cc: Marek Vasut Good article on strlcpy() is here [1]. I suggest we remove strlcpy() altogether and use standard posix functions like strncpy() instead. I am on Ulrich Drepper side on this, strlcpy() is just hiding bugs. [1] https://lwn.net/Articles/507319/ Best regards, Marek Vasut