summaryrefslogtreecommitdiff
path: root/src/core/ngx_connection.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/ngx_connection.c')
-rw-r--r--src/core/ngx_connection.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/ngx_connection.c b/src/core/ngx_connection.c
index e12d3efc0..28bf6ba06 100644
--- a/src/core/ngx_connection.c
+++ b/src/core/ngx_connection.c
@@ -297,7 +297,7 @@ ngx_open_listening_sockets(ngx_cycle_t *cycle)
continue;
}
- if (ls[i].fd != -1) {
+ if (ls[i].fd != (ngx_socket_t) -1) {
continue;
}
@@ -312,7 +312,7 @@ ngx_open_listening_sockets(ngx_cycle_t *cycle)
s = ngx_socket(ls[i].sockaddr->sa_family, ls[i].type, 0);
- if (s == -1) {
+ if (s == (ngx_socket_t) -1) {
ngx_log_error(NGX_LOG_EMERG, log, ngx_socket_errno,
ngx_socket_n " %V failed", &ls[i].addr_text);
return NGX_ERROR;
@@ -863,7 +863,7 @@ ngx_close_connection(ngx_connection_t *c)
ngx_uint_t log_error, level;
ngx_socket_t fd;
- if (c->fd == -1) {
+ if (c->fd == (ngx_socket_t) -1) {
ngx_log_error(NGX_LOG_ALERT, c->log, 0, "connection already closed");
return;
}