Permalink
Browse files

minor fix

  • Loading branch information...
1 parent c79e770 commit 2cad632e82188af4a6a7d34166a5c833104e1567 @cloudwu committed Apr 7, 2012
Showing with 1 addition and 2 deletions.
  1. +0 −1 map.c
  2. +1 −1 mread.c
View
1 map.c
@@ -17,7 +17,6 @@ struct map {
struct map *
map_new(int max) {
int sz = 1;
- max = max * 3 / 2;
while (sz <= max) {
sz *= 2;
}
View
@@ -125,7 +125,7 @@ mread_create(int port , int max , int buffer_size) {
self->skip = 0;
self->sockets = _create_sockets(max);
self->free_socket = &self->sockets[0];
- self->socket_hash = map_new(max);
+ self->socket_hash = map_new(max * 3 / 2);
self->queue_len = 0;
self->queue_head = 0;
if (buffer_size == 0) {

0 comments on commit 2cad632

Please sign in to comment.