[hackers] [scc] [libc] Make strcat style consistent with the rest || Quentin Rameau

From: <git_AT_suckless.org>
Date: Fri, 17 Feb 2017 11:01:40 +0100 (CET)

commit 33e066699ac30dd5ce4b1fbffe3c87bb663338ff
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 11:00:33 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 - 11:01:40 CET

This archive was generated by hypermail 2.3.0 : Fri Feb 17 2017 - 11:12:44 CET