From: H. Peter Anvin Date: Thu, 13 Aug 2009 04:23:10 +0000 (-0700) Subject: com32: remove strpcpy() - we already have stpcpy() X-Git-Tag: syslinux-4.00-pre3~21 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9d74e76846da90d73f77ea9e8275a071d869fd31;p=platform%2Fupstream%2Fsyslinux.git com32: remove strpcpy() - we already have stpcpy() Remove strpcpy(); it is exactly the same thing as stpcpy() which we already have, and which is more "standard" (in the sense that none of these are actually standard...) Signed-off-by: H. Peter Anvin --- diff --git a/com32/include/string.h b/com32/include/string.h index c964ee3..af9792b 100644 --- a/com32/include/string.h +++ b/com32/include/string.h @@ -23,7 +23,6 @@ __extern char *strcat(char *, const char *); __extern char *strchr(const char *, int); __extern int strcmp(const char *, const char *); __extern char *strcpy(char *, const char *); -__extern char *strpcpy(char *, const char *); __extern size_t strcspn(const char *, const char *); __extern char *strdup(const char *); __extern char *strndup(const char *, size_t); diff --git a/com32/lib/Makefile b/com32/lib/Makefile index 1806ec2..0f43aee 100644 --- a/com32/lib/Makefile +++ b/com32/lib/Makefile @@ -17,7 +17,7 @@ LIBOBJS = \ exit.o onexit.o \ perror.o printf.o puts.o qsort.o realloc.o seed48.o snprintf.o \ sprintf.o srand48.o sscanf.o stack.o strcasecmp.o strcat.o \ - strchr.o strcmp.o strcpy.o strpcpy.o strdup.o strlen.o \ + strchr.o strcmp.o strcpy.o strdup.o strlen.o \ strerror.o strnlen.o \ strncasecmp.o strncat.o strncmp.o strncpy.o strndup.o \ stpcpy.o stpncpy.o \ diff --git a/com32/lib/strpcpy.c b/com32/lib/strpcpy.c deleted file mode 100644 index a4fd2a0..0000000 --- a/com32/lib/strpcpy.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * strpcpy.c - * - * strpcpy() - strcpy() which returns a pointer to the final null - */ - -#include - -char *strpcpy(char *dst, const char *src) -{ - char *q = dst; - const char *p = src; - char ch; - - do { - *q++ = ch = *p++; - } while (ch); - - return q - 1; -} diff --git a/com32/mboot/mboot.c b/com32/mboot/mboot.c index e7bb8db..62ebf52 100644 --- a/com32/mboot/mboot.c +++ b/com32/mboot/mboot.c @@ -135,7 +135,7 @@ static int get_modules(char **argv, struct module_data **mdp) char *p; mp->cmdline = p = malloc(arglen); for (; *argp && strcmp(*argp, module_separator); argp++) { - p = strpcpy(p, *argp); + p = stpcpy(p, *argp); *p++ = ' '; } *--p = '\0';