rename nfds to max_nfds, no object change

This commit is contained in:
Alexandre Ratchov 2015-07-17 11:51:31 +02:00
parent 9624f2332e
commit 2d77ef48f3
2 changed files with 6 additions and 6 deletions

View File

@ -233,7 +233,7 @@ file_new(struct fileops *ops, void *arg, char *name, unsigned int nfds)
return NULL;
}
f = xmalloc(sizeof(struct file));
f->nfds = nfds;
f->max_nfds = nfds;
f->ops = ops;
f->arg = arg;
f->name = name;
@ -246,7 +246,7 @@ file_new(struct fileops *ops, void *arg, char *name, unsigned int nfds)
log_puts(": created\n");
}
#endif
file_nfds += f->nfds;
file_nfds += f->max_nfds;
return f;
}
@ -259,7 +259,7 @@ file_del(struct file *f)
panic();
}
#endif
file_nfds -= f->nfds;
file_nfds -= f->max_nfds;
f->state = FILE_ZOMB;
#ifdef DEBUG
if (log_level >= 3) {
@ -279,10 +279,10 @@ file_poll(void)
struct timespec sleepts;
struct timespec ts0, ts1;
long us;
int i, n, nfds;
int i;
#endif
long long delta_nsec;
int revents, res, immed;
int n, nfds, revents, res, immed;
/*
* cleanup zombies

View File

@ -53,7 +53,7 @@ struct file {
#define FILE_INIT 0 /* ready */
#define FILE_ZOMB 1 /* closed, but not free()d yet */
unsigned int state; /* one of above */
unsigned int nfds; /* max number of descriptors */
unsigned int max_nfds; /* max number of descriptors */
char *name; /* for debug purposes */
};