[hackers] [scc] [libc] Make strcat style consistent with the rest || Quentin Rameau
commit 1bb66efc09e23a038f2e883332894517bafe96a2
Author: Quentin Rameau <quinq_AT_fifth.space>
AuthorDate: Fri Feb 17 01:33:49 2017 +0100
Commit: Quentin Rameau <quinq_AT_fifth.space>
CommitDate: Fri Feb 17 10:51:40 2017 +0100
[libc] Make strcat style consistent with the rest
diff --git a/libc/src/strcat.c b/libc/src/strcat.c
index 86757c9..ce8b257 100644
--- a/libc/src/strcat.c
+++ b/libc/src/strcat.c
_AT_@ -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;
Received on Fri Feb 17 2017 - 10:52:57 CET
This archive was generated by hypermail 2.3.0
: Fri Feb 17 2017 - 11:01:12 CET