Commit 49913f1f authored by Heiko Carstens's avatar Heiko Carstens Committed by Martin Schwidefsky

s390: cleanup string ops prototypes

Just some trivial changes like removing the extern keyword from the
header file, renaming arguments to match the man pages, and whitespace
removal.
Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 993fef95
...@@ -33,17 +33,17 @@ ...@@ -33,17 +33,17 @@
#define __HAVE_ARCH_STRSTR /* arch function */ #define __HAVE_ARCH_STRSTR /* arch function */
/* Prototypes for non-inlined arch strings functions. */ /* Prototypes for non-inlined arch strings functions. */
extern int memcmp(const void *, const void *, size_t); int memcmp(const void *s1, const void *s2, size_t n);
extern void *memcpy(void *, const void *, size_t); void *memcpy(void *dest, const void *src, size_t n);
extern void *memset(void *, int, size_t); void *memset(void *s, int c, size_t n);
extern void *memmove(void *, const void *, size_t); void *memmove(void *dest, const void *src, size_t n);
extern int strcmp(const char *,const char *); int strcmp(const char *s1, const char *s2);
extern size_t strlcat(char *, const char *, size_t); size_t strlcat(char *dest, const char *src, size_t n);
extern size_t strlcpy(char *, const char *, size_t); size_t strlcpy(char *dest, const char *src, size_t size);
extern char *strncat(char *, const char *, size_t); char *strncat(char *dest, const char *src, size_t n);
extern char *strncpy(char *, const char *, size_t); char *strncpy(char *dest, const char *src, size_t n);
extern char *strrchr(const char *, int); char *strrchr(const char *s, int c);
extern char *strstr(const char *, const char *); char *strstr(const char *s1, const char *s2);
#undef __HAVE_ARCH_STRCHR #undef __HAVE_ARCH_STRCHR
#undef __HAVE_ARCH_STRNCHR #undef __HAVE_ARCH_STRNCHR
......
...@@ -55,7 +55,7 @@ EXPORT_SYMBOL(strlen); ...@@ -55,7 +55,7 @@ EXPORT_SYMBOL(strlen);
* *
* returns the minimum of the length of @s and @n * returns the minimum of the length of @s and @n
*/ */
size_t strnlen(const char * s, size_t n) size_t strnlen(const char *s, size_t n)
{ {
return __strnend(s, n) - s; return __strnend(s, n) - s;
} }
...@@ -194,14 +194,14 @@ EXPORT_SYMBOL(strncat); ...@@ -194,14 +194,14 @@ EXPORT_SYMBOL(strncat);
/** /**
* strcmp - Compare two strings * strcmp - Compare two strings
* @cs: One string * @s1: One string
* @ct: Another string * @s2: Another string
* *
* returns 0 if @cs and @ct are equal, * returns 0 if @s1 and @s2 are equal,
* < 0 if @cs is less than @ct * < 0 if @s1 is less than @s2
* > 0 if @cs is greater than @ct * > 0 if @s1 is greater than @s2
*/ */
int strcmp(const char *cs, const char *ct) int strcmp(const char *s1, const char *s2)
{ {
register int r0 asm("0") = 0; register int r0 asm("0") = 0;
int ret = 0; int ret = 0;
...@@ -213,7 +213,7 @@ int strcmp(const char *cs, const char *ct) ...@@ -213,7 +213,7 @@ int strcmp(const char *cs, const char *ct)
" ic %1,0(%3)\n" " ic %1,0(%3)\n"
" sr %0,%1\n" " sr %0,%1\n"
"1:" "1:"
: "+d" (ret), "+d" (r0), "+a" (cs), "+a" (ct) : "+d" (ret), "+d" (r0), "+a" (s1), "+a" (s2)
: : "cc", "memory"); : : "cc", "memory");
return ret; return ret;
} }
...@@ -224,7 +224,7 @@ EXPORT_SYMBOL(strcmp); ...@@ -224,7 +224,7 @@ EXPORT_SYMBOL(strcmp);
* @s: The string to be searched * @s: The string to be searched
* @c: The character to search for * @c: The character to search for
*/ */
char * strrchr(const char * s, int c) char *strrchr(const char *s, int c)
{ {
size_t len = __strend(s) - s; size_t len = __strend(s) - s;
...@@ -260,7 +260,7 @@ static inline int clcle(const char *s1, unsigned long l1, ...@@ -260,7 +260,7 @@ static inline int clcle(const char *s1, unsigned long l1,
* @s1: The string to be searched * @s1: The string to be searched
* @s2: The string to search for * @s2: The string to search for
*/ */
char * strstr(const char * s1,const char * s2) char *strstr(const char *s1, const char *s2)
{ {
int l1, l2; int l1, l2;
...@@ -306,15 +306,15 @@ EXPORT_SYMBOL(memchr); ...@@ -306,15 +306,15 @@ EXPORT_SYMBOL(memchr);
/** /**
* memcmp - Compare two areas of memory * memcmp - Compare two areas of memory
* @cs: One area of memory * @s1: One area of memory
* @ct: Another area of memory * @s2: Another area of memory
* @count: The size of the area. * @count: The size of the area.
*/ */
int memcmp(const void *cs, const void *ct, size_t n) int memcmp(const void *s1, const void *s2, size_t n)
{ {
int ret; int ret;
ret = clcle(cs, n, ct, n); ret = clcle(s1, n, s2, n);
if (ret) if (ret)
ret = ret == 1 ? -1 : 1; ret = ret == 1 ? -1 : 1;
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment