commit 33e066699ac30dd5ce4b1fbffe3c87bb663338ff
parent ff2c7c9b2b116228e9170c5b77c987572b5ad5ba
Author: Quentin Rameau <quinq@fifth.space>
Date: Fri, 17 Feb 2017 01:33:49 +0100
[libc] Make strcat style consistent with the rest
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libc/src/strcat.c b/libc/src/strcat.c
@@ -5,10 +5,10 @@
char *
strcat(char *dst, const char *src)
{
- char *ret;
+ char *ret = dst;
- for (ret = dst; *dst; ++dst)
- /* nothing */;
+ while (*dst)
+ ++dst;
while (*dst++ = *src++)
/* nothing */;
return ret;