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

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

commit f3073a83ac278dec8774e0aee1356b757fb48b04
Author: Quentin Rameau <quinq_AT_fifth.space>
AuthorDate: Fri Feb 17 00:39:11 2017 +0100
Commit: Quentin Rameau <quinq_AT_fifth.space>
CommitDate: Fri Feb 17 11:00:33 2017 +0100

    [libc] Make memset style consistent with the rest

diff --git a/libc/src/memset.c b/libc/src/memset.c
index 2222ce1..8a80c64 100644
--- a/libc/src/memset.c
+++ b/libc/src/memset.c
_AT_@ -5,9 +5,9 @@
 void *
 memset(void *s, int c, size_t n)
 {
- char *bp;
+ char *m = s;
 
- for (bp = s; n-- > 0; *bp++ = c)
- /* nothing */;
+ while (n-- > 0)
+ *m++ = c;
         return s;
 }
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:27 CET