diff options
Diffstat (limited to 'utils.c')
| -rw-r--r-- | utils.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -25,14 +25,14 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
| 25 | #include <stdlib.h> | 25 | #include <stdlib.h> |
| 26 | #include "utils.h" | 26 | #include "utils.h" |
| 27 | 27 | ||
| 28 | void fdlist_create(fdlist *list) | 28 | void fdlist_create(struct fdlist *list) |
| 29 | { | 29 | { |
| 30 | list->count = 0; | 30 | list->count = 0; |
| 31 | list->capacity = 4; | 31 | list->capacity = 4; |
| 32 | list->owners = malloc(sizeof(*list->owners) * list->capacity); | 32 | list->owners = malloc(sizeof(*list->owners) * list->capacity); |
| 33 | list->fds = malloc(sizeof(*list->fds) * list->capacity); | 33 | list->fds = malloc(sizeof(*list->fds) * list->capacity); |
| 34 | } | 34 | } |
| 35 | void fdlist_add(fdlist *list, enum fdowner owner, int fd, short events) | 35 | void fdlist_add(struct fdlist *list, enum fdowner owner, int fd, short events) |
| 36 | { | 36 | { |
| 37 | if(list->count == list->capacity) { | 37 | if(list->count == list->capacity) { |
| 38 | list->capacity *= 2; | 38 | list->capacity *= 2; |
| @@ -46,7 +46,7 @@ void fdlist_add(fdlist *list, enum fdowner owner, int fd, short events) | |||
| 46 | list->count++; | 46 | list->count++; |
| 47 | } | 47 | } |
| 48 | 48 | ||
| 49 | void fdlist_free(fdlist *list) | 49 | void fdlist_free(struct fdlist *list) |
| 50 | { | 50 | { |
| 51 | list->count = 0; | 51 | list->count = 0; |
| 52 | list->capacity = 0; | 52 | list->capacity = 0; |
