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

From: <git_AT_suckless.org>
Date: Fri, 17 Feb 2017 10:52:56 +0100 (CET)

commit d8cd78678eb8fb4e9c33e0efe1e1a393fb609c6b
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 10:51:35 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 - 10:52:56 CET

This archive was generated by hypermail 2.3.0 : Fri Feb 17 2017 - 11:00:55 CET