提交 bdd90b2b authored 作者: Michael Jerris's avatar Michael Jerris

Tue May 20 12:15:42 EDT 2008 Pekka.Pessi@nokia.com

  * sres_blocking.c: fixed klocwork issues


git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8620 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 8826832f
Sun May 25 11:07:19 EDT 2008 Sun May 25 11:08:26 EDT 2008
...@@ -111,7 +111,7 @@ int sres_blocking_update(sres_blocking_t *b, ...@@ -111,7 +111,7 @@ int sres_blocking_update(sres_blocking_t *b,
sres_socket_t new_socket, sres_socket_t new_socket,
sres_socket_t old_socket) sres_socket_t old_socket)
{ {
int i, N = b->n_sockets; int i, N;
if (b == NULL) if (b == NULL)
return -1; return -1;
...@@ -123,6 +123,8 @@ int sres_blocking_update(sres_blocking_t *b, ...@@ -123,6 +123,8 @@ int sres_blocking_update(sres_blocking_t *b,
return 0; return 0;
} }
N = b->n_sockets;
if (old_socket != INVALID_SOCKET) { if (old_socket != INVALID_SOCKET) {
for (i = 0; i < N; i++) { for (i = 0; i < N; i++) {
if (b->fds[i].fd == old_socket) if (b->fds[i].fd == old_socket)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论