summaryrefslogtreecommitdiffstats
path: root/payloads/libpayload/libc/string.c
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2008-03-20 19:54:59 +0000
committerUwe Hermann <uwe@hermann-uwe.de>2008-03-20 19:54:59 +0000
commit6a441bfb46337ed6b59abed56dad35d94802282c (patch)
tree44eb1d67fcbc450907472186bbc0036afe9e380c /payloads/libpayload/libc/string.c
parent5f4c8abb6537fa7377969e837dab987abefcf922 (diff)
downloadcoreboot-6a441bfb46337ed6b59abed56dad35d94802282c.tar.gz
coreboot-6a441bfb46337ed6b59abed56dad35d94802282c.tar.bz2
coreboot-6a441bfb46337ed6b59abed56dad35d94802282c.zip
Cosmetics, coding style fixes (trivial).
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3180 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'payloads/libpayload/libc/string.c')
-rw-r--r--payloads/libpayload/libc/string.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/payloads/libpayload/libc/string.c b/payloads/libpayload/libc/string.c
index 87f5789b4cc8..bbe99933f028 100644
--- a/payloads/libpayload/libc/string.c
+++ b/payloads/libpayload/libc/string.c
@@ -135,8 +135,8 @@ char *strncpy(char *d, const char *s, int n)
int max = n > strlen(s) + 1 ? strlen(s) + 1 : n;
int i;
- for(i = 0; i < max; i++)
- d[i] = (char) s[i];
+ for (i = 0; i < max; i++)
+ d[i] = (char)s[i];
return d;
}
@@ -152,18 +152,18 @@ char *strncat(char *d, const char *s, int n)
int max = n > strlen(s) ? strlen(s) : n;
int i;
- for(i = 0; i < max; i++)
+ for (i = 0; i < max; i++)
p[i] = s[i];
p[i] = '\0';
return d;
}
-char * strchr(const char *s, int c)
+char *strchr(const char *s, int c)
{
- char *p = (char *) s;
+ char *p = (char *)s;
- for( ; *p != 0; p++) {
+ for (; *p != 0; p++) {
if (*p == c)
return p;
}
@@ -171,7 +171,6 @@ char * strchr(const char *s, int c)
return NULL;
}
-
char *strdup(const char *s)
{
int n = strlen(s);
@@ -189,11 +188,9 @@ char *strstr(const char *h, const char *n)
int nn = strlen(n);
int i;
- for(i = 0; i <= hn - nn; i++)
+ for (i = 0; i <= hn - nn; i++)
if (!strcmp(&h[i], n))
- return (char *) &h[i];
+ return (char *)&h[i];
return NULL;
}
-
-