From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Thu, 3 Apr 2014 10:16:14 +0200 Subject: [U-Boot] [PATCH v12 1/8] libc: move strlcpy() from ether.c to string.c In-Reply-To: References: <1396342019-644-1-git-send-email-dantesu@gmail.com> <201404011116.07196.marex@denx.de> Message-ID: <201404031016.14460.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 Thursday, April 03, 2014 at 02:58:27 AM, Kuo-Jung Su wrote: > 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. Can you please remove that strlcpy() implementation while at it ? Best regards, Marek Vasut