curl_fnmatch: remove use of register keyword

Using the 'register' keyword rarely improves anything with modern
compilers and architectures.
This commit is contained in:
Tor Arntsen 2010-05-27 16:34:57 +02:00 committed by Kamil Dudka
parent d3c813e726
commit 97b497a75f
1 changed files with 4 additions and 4 deletions

View File

@ -67,7 +67,7 @@ static int parsekeyword(unsigned char **pattern, unsigned char *charset)
char keyword[KEYLEN] = { 0 }; char keyword[KEYLEN] = { 0 };
int found = FALSE; int found = FALSE;
int i; int i;
register unsigned char *p = *pattern; unsigned char *p = *pattern;
for(i = 0; !found; i++) { for(i = 0; !found; i++) {
char c = *p++; char c = *p++;
if(i >= KEYLEN) if(i >= KEYLEN)
@ -123,7 +123,7 @@ static int setcharset(unsigned char **p, unsigned char *charset)
unsigned char rangestart = 0; unsigned char rangestart = 0;
unsigned char lastchar = 0; unsigned char lastchar = 0;
bool something_found = FALSE; bool something_found = FALSE;
register unsigned char c; unsigned char c;
for(;;) { for(;;) {
c = **p; c = **p;
switch(state) { switch(state) {
@ -300,8 +300,8 @@ static int setcharset(unsigned char **p, unsigned char *charset)
static int loop(const unsigned char *pattern, const unsigned char *string) static int loop(const unsigned char *pattern, const unsigned char *string)
{ {
loop_state state = CURLFNM_LOOP_DEFAULT; loop_state state = CURLFNM_LOOP_DEFAULT;
register unsigned char *p = (unsigned char *)pattern; unsigned char *p = (unsigned char *)pattern;
register unsigned char *s = (unsigned char *)string; unsigned char *s = (unsigned char *)string;
unsigned char charset[CURLFNM_CHSET_SIZE] = { 0 }; unsigned char charset[CURLFNM_CHSET_SIZE] = { 0 };
int rc = 0; int rc = 0;