Re: [U-Boot] [PATCH] lib/string: added strndup

2012-01-05 Thread Mike Frysinger
On Thursday 22 December 2011 13:16:56 Grant Erickson wrote: +#ifndef __HAVE_ARCH_STRNDUP +extern char * strndup(const char *,__kernel_size_t); +#endif no space after that first *, and add a space after the , since your definition uses size_t, then use that rather than __kernel_size_t ---

Re: [U-Boot] [PATCH] lib/string: added strndup

2012-01-05 Thread Wolfgang Denk
Dear Mike Frysinger, In message 201201051821.35774.vap...@gentoo.org you wrote: + if ((s == NULL) || + ((new = malloc (len + 1)) == NULL) ) { + return NULL; + } please split this up such as: I'm OK with the splitting, but... if (s == NULL)

Re: [U-Boot] [PATCH] lib/string: added strndup

2012-01-05 Thread Mike Frysinger
On Thursday 05 January 2012 18:25:06 Wolfgang Denk wrote: Mike Frysinger wrote: + if ((s == NULL) || + ((new = malloc (len + 1)) == NULL) ) { + return NULL; + } please split this up such as: I'm OK with the splitting, but... if (s == NULL)

[U-Boot] [PATCH] lib/string: added strndup

2011-12-22 Thread Grant Erickson
This patch adds optional support for strndup. Signed-off-by: Grant Erickson maratho...@gmail.com --- include/linux/string.h |3 +++ lib/string.c | 21 + 2 files changed, 24 insertions(+), 0 deletions(-) diff --git a/include/linux/string.h

Re: [U-Boot] [PATCH] lib/string: added strndup

2011-12-22 Thread Wolfgang Denk
Dear Grant Erickson, In message 1324577816-26198-1-git-send-email-maratho...@gmail.com you wrote: This patch adds optional support for strndup. Signed-off-by: Grant Erickson maratho...@gmail.com --- include/linux/string.h |3 +++ lib/string.c | 21 + 2

Re: [U-Boot] [PATCH] lib/string: added strndup

2011-12-22 Thread Grant Erickson
On Dec 22, 2011, at 1:08 PM, Wolfgang Denk wrote: In message 1324577816-26198-1-git-send-email-maratho...@gmail.com you wrote: This patch adds optional support for strndup. Signed-off-by: Grant Erickson maratho...@gmail.com --- include/linux/string.h |3 +++ lib/string.c |