diff options
author | Sergei Golubchik <sergii@pisem.net> | 2011-10-29 20:40:03 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2011-10-29 20:40:03 +0200 |
commit | 3794110f0215f0631107c2694dc0f1675a4bb520 (patch) | |
tree | 3400a806088335fffbb0c567d5ee7f40ca9a90ce /sql/mysqld.cc | |
parent | 949027f7c7b8704f2a329c85b8725af5158f3ade (diff) | |
download | mariadb-git-3794110f0215f0631107c2694dc0f1675a4bb520.tar.gz |
fix the build and compiler warnings (few of which were real bugs)
for "cmake ." builds
Diffstat (limited to 'sql/mysqld.cc')
-rw-r--r-- | sql/mysqld.cc | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc index d9143e43e42..b2b066230bc 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -2093,7 +2093,7 @@ static my_socket activate_tcp_port(uint port) int error; int arg; char port_buf[NI_MAXSERV]; - my_socket ip_sock; + my_socket ip_sock= INVALID_SOCKET; DBUG_ENTER("activate_tcp_port"); DBUG_PRINT("general",("IP Socket is %d",port)); @@ -2111,12 +2111,8 @@ static my_socket activate_tcp_port(uint port) unireg_abort(1); /* purecov: tested */ } - for (a= ai; a != NULL; a= a->ai_next) - { + for (a= ai; a != NULL && ip_sock == INVALID_SOCKET; a= a->ai_next) ip_sock= socket(a->ai_family, a->ai_socktype, a->ai_protocol); - if (ip_sock != INVALID_SOCKET) - break; - } if (ip_sock == INVALID_SOCKET) { |