replace hardcoded value with define
authorPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Tue, 23 Mar 2010 04:15:08 +0000 (00:15 -0400)
committerPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Tue, 23 Mar 2010 04:15:08 +0000 (00:15 -0400)
libustcomm/multipoll.c

index db9c2ec95b4622f85eb334eded089664965c4f6d..1ac51a58bfacbcbde590acffce61ea95d30a06a7 100644 (file)
@@ -30,8 +30,8 @@ int multipoll_init(struct mpentries *ent)
        ent->n_used = 0;
        ent->n_avail = INITIAL_N_AVAIL;
 
-       ent->pollfds = (struct pollfd *) malloc(sizeof(struct pollfd) * 16);
-       ent->extras = (struct pollfd_extra *) malloc(sizeof(struct pollfd_extra) * 16);
+       ent->pollfds = (struct pollfd *) malloc(sizeof(struct pollfd) * INITIAL_N_AVAIL);
+       ent->extras = (struct pollfd_extra *) malloc(sizeof(struct pollfd_extra) * INITIAL_N_AVAIL);
 
        return 0;
 }
This page took 0.023784 seconds and 4 git commands to generate.