summaryrefslogtreecommitdiff
path: root/ldso/include/dl-string.h
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2009-01-10 21:02:48 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2009-01-10 21:02:48 +0000
commit27d501fdbf0c6932e6170e8dece4d178d912bf94 (patch)
tree054224e4ebe3ee638fb5b8d28e9873fbcd13c537 /ldso/include/dl-string.h
parent1c778b7cfac9228aa6dbd3c7d3b1417887fc3031 (diff)
simple optimizations and style fixes in dynamic loading
text data bss dec hex filename - 16709 240 92 17041 4291 lib/ld-uClibc.so + 16634 236 92 16962 4242 lib/ld-uClibc.so - 4602 344 4 4950 1356 lib/libdl-0.9.30-svn.so + 4571 328 4 4903 1327 lib/libdl-0.9.30-svn.so - 4602 344 4 4950 1356 lib/libdl.so + 4571 328 4 4903 1327 lib/libdl.so
Diffstat (limited to 'ldso/include/dl-string.h')
-rw-r--r--ldso/include/dl-string.h40
1 files changed, 20 insertions, 20 deletions
diff --git a/ldso/include/dl-string.h b/ldso/include/dl-string.h
index 746bd91c6..1a47e31ed 100644
--- a/ldso/include/dl-string.h
+++ b/ldso/include/dl-string.h
@@ -19,26 +19,26 @@
# define do_div_10(result, remain) ((result) /= 10)
#endif
-static size_t _dl_strlen(const char * str);
+static size_t _dl_strlen(const char *str);
static char *_dl_strcat(char *dst, const char *src);
-static char * _dl_strcpy(char * dst,const char *src);
-static int _dl_strcmp(const char * s1,const char * s2);
-static int _dl_strncmp(const char * s1,const char * s2,size_t len);
-static char * _dl_strchr(const char * str,int c);
+static char *_dl_strcpy(char *dst, const char *src);
+static int _dl_strcmp(const char *s1, const char *s2);
+static int _dl_strncmp(const char *s1, const char *s2, size_t len);
+static char *_dl_strchr(const char *str, int c);
static char *_dl_strrchr(const char *str, int c);
static char *_dl_strstr(const char *s1, const char *s2);
-static void * _dl_memcpy(void * dst, const void * src, size_t len);
-static int _dl_memcmp(const void * s1,const void * s2,size_t len);
-static void *_dl_memset(void * str,int c,size_t len);
+static void *_dl_memcpy(void *dst, const void *src, size_t len);
+static int _dl_memcmp(const void *s1, const void *s2, size_t len);
+static void *_dl_memset(void *str, int c, size_t len);
static char *_dl_get_last_path_component(char *path);
-static char *_dl_simple_ltoa(char * local, unsigned long i);
-static char *_dl_simple_ltoahex(char * local, unsigned long i);
+static char *_dl_simple_ltoa(char *local, unsigned long i);
+static char *_dl_simple_ltoahex(char *local, unsigned long i);
#ifndef NULL
#define NULL ((void *) 0)
#endif
-static __always_inline size_t _dl_strlen(const char * str)
+static __always_inline size_t _dl_strlen(const char *str)
{
register const char *ptr = (char *) str-1;
while (*++ptr)
@@ -59,7 +59,7 @@ static __always_inline char * _dl_strcat(char *dst, const char *src)
return dst;
}
-static __always_inline char * _dl_strcpy(char * dst,const char *src)
+static __always_inline char * _dl_strcpy(char *dst, const char *src)
{
register char *ptr = dst;
@@ -70,7 +70,7 @@ static __always_inline char * _dl_strcpy(char * dst,const char *src)
return ptr;
}
-static __always_inline int _dl_strcmp(const char * s1,const char * s2)
+static __always_inline int _dl_strcmp(const char *s1, const char *s2)
{
register unsigned char c1, c2;
s1--;s2--;
@@ -84,7 +84,7 @@ static __always_inline int _dl_strcmp(const char * s1,const char * s2)
return c1 - c2;
}
-static __always_inline int _dl_strncmp(const char * s1,const char * s2,size_t len)
+static __always_inline int _dl_strncmp(const char *s1, const char *s2, size_t len)
{
register unsigned char c1 = '\0';
register unsigned char c2 = '\0';
@@ -100,7 +100,7 @@ static __always_inline int _dl_strncmp(const char * s1,const char * s2,size_t le
return c1 - c2;
}
-static __always_inline char * _dl_strchr(const char * str,int c)
+static __always_inline char * _dl_strchr(const char *str, int c)
{
register char ch;
str--;
@@ -147,7 +147,7 @@ static __always_inline char * _dl_strstr(const char *s1, const char *s2)
} while (1);
}
-static __always_inline void * _dl_memcpy(void * dst, const void * src, size_t len)
+static __always_inline void * _dl_memcpy(void *dst, const void *src, size_t len)
{
register char *a = dst-1;
register const char *b = src-1;
@@ -159,7 +159,7 @@ static __always_inline void * _dl_memcpy(void * dst, const void * src, size_t le
return dst;
}
-static __always_inline int _dl_memcmp(const void * s1,const void * s2,size_t len)
+static __always_inline int _dl_memcmp(const void *s1, const void *s2, size_t len)
{
unsigned char *c1 = (unsigned char *)s1-1;
unsigned char *c2 = (unsigned char *)s2-1;
@@ -200,7 +200,7 @@ lessthan4:
return to;
}
#else
-static __always_inline void * _dl_memset(void * str,int c,size_t len)
+static __always_inline void * _dl_memset(void *str, int c, size_t len)
{
register char *a = str;
@@ -232,7 +232,7 @@ static __always_inline char * _dl_get_last_path_component(char *path)
/* Early on, we can't call printf, so use this to print out
* numbers using the SEND_STDERR() macro. Avoid using mod
* or using long division */
-static __always_inline char * _dl_simple_ltoa(char * local, unsigned long i)
+static __always_inline char * _dl_simple_ltoa(char *local, unsigned long i)
{
/* 20 digits plus a null terminator should be good for
* 64-bit or smaller ints (2^64 - 1)*/
@@ -247,7 +247,7 @@ static __always_inline char * _dl_simple_ltoa(char * local, unsigned long i)
return p;
}
-static __always_inline char * _dl_simple_ltoahex(char * local, unsigned long i)
+static __always_inline char * _dl_simple_ltoahex(char *local, unsigned long i)
{
/* 16 digits plus a leading "0x" plus a null terminator,
* should be good for 64-bit or smaller ints */