Add restrict keyword to string functions.
Reviewed by: bde
This commit is contained in:
parent
2daf7453dd
commit
3a6e2d8617
@ -36,9 +36,7 @@
|
||||
#include <sys/libkern.h>
|
||||
|
||||
char *
|
||||
strcat(s, append)
|
||||
register char *s;
|
||||
register const char *append;
|
||||
strcat(char * __restrict s, const char * __restrict append)
|
||||
{
|
||||
char *save = s;
|
||||
|
||||
|
@ -36,9 +36,7 @@
|
||||
#include <sys/libkern.h>
|
||||
|
||||
char *
|
||||
strcpy(to, from)
|
||||
register char *to;
|
||||
register const char *from;
|
||||
strcpy(char * __restrict to, const char * __restrict from)
|
||||
{
|
||||
char *save = to;
|
||||
|
||||
|
@ -43,10 +43,7 @@
|
||||
* Return dst.
|
||||
*/
|
||||
char *
|
||||
strncpy(dst, src, n)
|
||||
char *dst;
|
||||
const char *src;
|
||||
register size_t n;
|
||||
strncpy(char * __restrict dst, const char * __restrict src, size_t n)
|
||||
{
|
||||
if (n != 0) {
|
||||
register char *d = dst;
|
||||
|
@ -89,14 +89,14 @@ char *rindex(const char *, int);
|
||||
int scanc(u_int, const u_char *, const u_char *, int);
|
||||
int skpc(int, int, char *);
|
||||
void srandom(u_long);
|
||||
char *strcat(char *, const char *);
|
||||
char *strcat(char * __restrict, const char * __restrict);
|
||||
int strcmp(const char *, const char *);
|
||||
char *strcpy(char *, const char *);
|
||||
char *strcpy(char * __restrict, const char * __restrict);
|
||||
size_t strlcat(char *, const char *, size_t);
|
||||
size_t strlcpy(char *, const char *, size_t);
|
||||
size_t strlen(const char *);
|
||||
int strncmp(const char *, const char *, size_t);
|
||||
char *strncpy(char *, const char *, size_t);
|
||||
char *strncpy(char * __restrict, const char * __restrict, size_t);
|
||||
char *strsep(char **, const char *delim);
|
||||
int strvalid(const char *, size_t);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user