[hackers] [scc] [libc] Sync src definitions to headers declarations || Quentin Rameau

From: <git_AT_suckless.org>
Date: Wed, 22 Feb 2017 22:12:31 +0100 (CET)

commit 1604bfd6b0da8e6757d423f5cf3dc528348cd4cb
Author: Quentin Rameau <quinq_AT_fifth.space>
AuthorDate: Wed Feb 22 21:48:55 2017 +0100
Commit: Quentin Rameau <quinq_AT_fifth.space>
CommitDate: Wed Feb 22 22:09:09 2017 +0100

    [libc] Sync src definitions to headers declarations

diff --git a/libc/src/memcpy.c b/libc/src/memcpy.c
index d566fc3..6889ccf 100644
--- a/libc/src/memcpy.c
+++ b/libc/src/memcpy.c
_AT_@ -3,7 +3,7 @@
 #include <string.h>
 
 void *
-memcpy(void *dst, const void *src, size_t n)
+memcpy(void * restrict dst, const void * restrict src, size_t n)
 {
         char *s1 = dst;
         const char *s2 = src;
diff --git a/libc/src/strcat.c b/libc/src/strcat.c
index ce8b257..a3522a0 100644
--- a/libc/src/strcat.c
+++ b/libc/src/strcat.c
_AT_@ -3,7 +3,7 @@
 #include <string.h>
 
 char *
-strcat(char *dst, const char *src)
+strcat(char * restrict dst, const char * restrict src)
 {
         char *ret = dst;
 
diff --git a/libc/src/strcpy.c b/libc/src/strcpy.c
index 9e38335..9c4ba86 100644
--- a/libc/src/strcpy.c
+++ b/libc/src/strcpy.c
_AT_@ -3,7 +3,7 @@
 #include <string.h>
 
 char *
-strcpy(char *dst, const char *src)
+strcpy(char * restrict dst, const char * restrict src)
 {
         char *ret = dst;
 
diff --git a/libc/src/strncat.c b/libc/src/strncat.c
index 38e6e74..2a6b0bf 100644
--- a/libc/src/strncat.c
+++ b/libc/src/strncat.c
_AT_@ -3,7 +3,7 @@
 #include <string.h>
 
 char *
-strncat(char *dst, const char *src, size_t n)
+strncat(char * restrict dst, const char * restrict src, size_t n)
 {
         char *ret = dst;
 
diff --git a/libc/src/strncpy.c b/libc/src/strncpy.c
index a1a1456..d2c9121 100644
--- a/libc/src/strncpy.c
+++ b/libc/src/strncpy.c
_AT_@ -3,7 +3,7 @@
 #include <string.h>
 
 char *
-strncpy(char *dst, const char *src, size_t n)
+strncpy(char * restrict dst, const char * restrict src, size_t n)
 {
         char *ret = dst;
 
diff --git a/libc/src/strtok.c b/libc/src/strtok.c
index 33c99d1..ca6897e 100644
--- a/libc/src/strtok.c
+++ b/libc/src/strtok.c
_AT_@ -3,11 +3,11 @@
 #include <string.h>
 
 char *
-strtok(const char *s, const char *delim)
+strtok(char * restrict s, const char * restrict delim)
 {
         static char *line;
 
- if (s)
+ if (s)
                 line = s;
         if (!s && !line)
                 return NULL;
diff --git a/libc/src/strxfrm.c b/libc/src/strxfrm.c
index 8ea0140..b38e09c 100644
--- a/libc/src/strxfrm.c
+++ b/libc/src/strxfrm.c
_AT_@ -3,7 +3,7 @@
 #include <string.h>
 
 size_t
-strxfrm(char *dst, const char *src, size_t n)
+strxfrm(char * restrict dst, const char * restrict src, size_t n)
 {
         size_t len = strlen(src);
 
Received on Wed Feb 22 2017 - 22:12:31 CET

This archive was generated by hypermail 2.3.0 : Wed Feb 22 2017 - 22:24:18 CET