Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Minor clean up

git-svn-id: svn://cherokee-project.com/cherokee/trunk@6883 5dc97367-97f1-0310-9951-d761b3857238
  • Loading branch information...
commit acd3cbb1e756b33ed7aa42c90ceba63a384aade4 1 parent d2e7b95
@alobbs alobbs authored
Showing with 3 additions and 5 deletions.
  1. +3 −5 cherokee/main_admin.c
View
8 cherokee/main_admin.c
@@ -87,24 +87,22 @@ find_empty_port (int starting, int *port)
cherokee_buffer_t bind_ = CHEROKEE_BUF_INIT;
cherokee_buffer_add_str (&bind_, "127.0.0.1");
-
cherokee_socket_init (&s);
while (true) {
cherokee_socket_create_fd (&s, AF_INET);
ret = cherokee_socket_bind (&s, p, &bind_);
+ cherokee_socket_close (&s);
+
if (ret == ret_ok)
break;
- cherokee_socket_close (&s);
-
p += 1;
- if (p > 0XFFFF) {
+ if (unlikely (p > 0xFFFF)) {
goto error;
}
}
- cherokee_socket_close (&s);
cherokee_socket_mrproper (&s);
cherokee_buffer_mrproper (&bind_);
Please sign in to comment.
Something went wrong with that request. Please try again.