mirror of
https://github.com/xcat2/xNBA.git
synced 2024-12-13 23:01:31 +00:00
Marked memcmp/strcmp as "pure" functions, to allow gcc to optimise
away code such as if ( strcmp ( some_string, "some_value" ) != 0 ) { DBG ( "Bad value received!" ); }
This commit is contained in:
parent
c4677c7e73
commit
82342e0b8f
@ -47,8 +47,9 @@ char * strcpy(char * dest,const char *src);
|
||||
char * strncpy(char * dest,const char *src,size_t count);
|
||||
char * strcat(char * dest, const char * src);
|
||||
char * strncat(char *dest, const char *src, size_t count);
|
||||
int strcmp(const char * cs,const char * ct);
|
||||
int strncmp(const char * cs,const char * ct,size_t count);
|
||||
int __attribute__ (( pure )) strcmp(const char * cs,const char * ct);
|
||||
int __attribute__ (( pure )) strncmp(const char * cs,const char * ct,
|
||||
size_t count);
|
||||
char * strchr(const char * s, int c);
|
||||
char * strrchr(const char * s, int c);
|
||||
size_t strlen(const char * s);
|
||||
@ -60,7 +61,8 @@ char * strsep(char **s, const char *ct);
|
||||
void * memset(void * s,int c,size_t count);
|
||||
char * bcopy(const char * src, char * dest, int count);
|
||||
void * memmove(void * dest,const void *src,size_t count);
|
||||
int memcmp(const void * cs,const void * ct,size_t count);
|
||||
int __attribute__ (( pure )) memcmp(const void * cs,const void * ct,
|
||||
size_t count);
|
||||
void * memscan(void * addr, int c, size_t size);
|
||||
char * strstr(const char * s1,const char * s2);
|
||||
void * memchr(const void *s, int c, size_t n);
|
||||
|
Loading…
Reference in New Issue
Block a user