1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-28 00:21:52 +03:00

Avoid use of "register" as optimization hint.

This commit is contained in:
Joseph Myers
2013-06-07 22:24:35 +00:00
parent 8e254d8e0d
commit 2e09a79ada
79 changed files with 430 additions and 278 deletions

View File

@ -9,8 +9,8 @@ typedef struct _Buffer {
} Buffer;
void InitBuffer (Buffer *b);
void AppendToBuffer (register Buffer *b, const char *str, register int len);
void ReadFile (register Buffer *buffer, FILE *input);
void AppendToBuffer (Buffer *b, const char *str, int len);
void ReadFile (Buffer *buffer, FILE *input);
#define INIT_BUFFER_SIZE 10000
@ -23,9 +23,9 @@ void InitBuffer(b)
}
void AppendToBuffer(b, str, len)
register Buffer *b;
Buffer *b;
const char *str;
register int len;
int len;
{
while (b->used + len > b->room) {
b->buff = (char *)realloc(b->buff, 2*b->room*(sizeof(char)));
@ -36,11 +36,11 @@ void AppendToBuffer(b, str, len)
}
void ReadFile(buffer, input)
register Buffer *buffer;
Buffer *buffer;
FILE *input;
{
char buf[BUFSIZ + 1];
register int bytes;
int bytes;
buffer->used = 0;
while (!feof(input) && (bytes = fread(buf, 1, BUFSIZ, input)) > 0) {