mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-09 11:28:25 +00:00
formatting fixes (bug #4739)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
8
io.c
8
io.c
@@ -66,7 +66,6 @@ struct io_context {
|
|||||||
int needshrink;
|
int needshrink;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct io_context *io_context_create(void)
|
struct io_context *io_context_create(void)
|
||||||
{
|
{
|
||||||
/* Create an I/O context */
|
/* Create an I/O context */
|
||||||
@@ -88,10 +87,11 @@ struct io_context *io_context_create(void)
|
|||||||
free(tmp->fds);
|
free(tmp->fds);
|
||||||
free(tmp);
|
free(tmp);
|
||||||
tmp = NULL;
|
tmp = NULL;
|
||||||
} else
|
} else {
|
||||||
memset(tmp->ior, 0, (GROW_SHRINK_SIZE / 2) * sizeof(struct io_rec));
|
memset(tmp->ior, 0, (GROW_SHRINK_SIZE / 2) * sizeof(struct io_rec));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -130,7 +130,6 @@ static int io_grow(struct io_context *ioc)
|
|||||||
ioc->maxfdcnt -= GROW_SHRINK_SIZE;
|
ioc->maxfdcnt -= GROW_SHRINK_SIZE;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
* Out of memory. We return to the old size, and return a failure
|
* Out of memory. We return to the old size, and return a failure
|
||||||
@@ -190,7 +189,8 @@ int *ast_io_change(struct io_context *ioc, int *id, int fd, ast_io_cb callback,
|
|||||||
if (data)
|
if (data)
|
||||||
ioc->ior[*id].data = data;
|
ioc->ior[*id].data = data;
|
||||||
return id;
|
return id;
|
||||||
} else return NULL;
|
}
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int io_shrink(struct io_context *ioc)
|
static int io_shrink(struct io_context *ioc)
|
||||||
|
|||||||
Reference in New Issue
Block a user