From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kuo-Jung Su Date: Thu, 3 Apr 2014 08:58:27 +0800 Subject: [U-Boot] [PATCH v12 1/8] libc: move strlcpy() from ether.c to string.c In-Reply-To: <201404011116.07196.marex@denx.de> References: <1396342019-644-1-git-send-email-dantesu@gmail.com> <1396342019-644-2-git-send-email-dantesu@gmail.com> <201404011116.07196.marex@denx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 2014-04-01 17:16 GMT+08:00 Marek Vasut : > 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/ > Agree, I'll use strncpy instead of strlcpy in drivers/clk/clkdev.c & drivers/usb/gadget/ether.c And the patch for drivers/usb/gadget/ether.c would not be bonded to this patch series. -- Best wishes, Kuo-Jung Su