Ver Fonte

* Fix compiler warnings

Bryan Drewery há 16 anos atrás
pai
commit
8d49bf6ac6

+ 1 - 1
src/botnet.c

@@ -1099,7 +1099,7 @@ static void botlink_real(int i)
 //  if (dcc[i].sock > 0)
 //  if (dcc[i].sock > 0)
 //    identd_open();                      /* will be closed when an ident is replied. */
 //    identd_open();                      /* will be closed when an ident is replied. */
 
 
-  int open_telnet_return;
+  int open_telnet_return = 0;
   if (dcc[i].sock < 0 || (open_telnet_return = open_telnet_raw(dcc[i].sock, dcc[i].host, dcc[i].port, 0, 1)) < 0) {
   if (dcc[i].sock < 0 || (open_telnet_return = open_telnet_raw(dcc[i].sock, dcc[i].host, dcc[i].port, 0, 1)) < 0) {
     if (open_telnet_return == -1)
     if (open_telnet_return == -1)
       dcc[i].sock = -1;
       dcc[i].sock = -1;

+ 1 - 1
src/mod/server.mod/server.c

@@ -945,7 +945,7 @@ static void dcc_chat_hostresolved(int i)
 #else
 #else
   dcc[i].sock = getsock(0);
   dcc[i].sock = getsock(0);
 #endif /* USE_IPV6 */
 #endif /* USE_IPV6 */
-  int open_telnet_return;
+  int open_telnet_return = 0;
   if (dcc[i].sock < 0 || (open_telnet_return = open_telnet_dcc(dcc[i].sock, ip, buf)) < 0) {
   if (dcc[i].sock < 0 || (open_telnet_return = open_telnet_dcc(dcc[i].sock, ip, buf)) < 0) {
     if (open_telnet_return == -1)
     if (open_telnet_return == -1)
       dcc[i].sock = -1;
       dcc[i].sock = -1;

+ 1 - 1
src/mod/share.mod/share.c

@@ -998,7 +998,7 @@ share_ufsend(int idx, char *par)
 #else
 #else
     sock = getsock(SOCK_BINARY);        /* Don't buffer this -> mark binary. */
     sock = getsock(SOCK_BINARY);        /* Don't buffer this -> mark binary. */
 #endif /* USE_IPV6 */
 #endif /* USE_IPV6 */
-    int open_telnet_return;
+    int open_telnet_return = 0;
     if (sock < 0 || (open_telnet_return = open_telnet_dcc(sock, ip, port)) < 0) {
     if (sock < 0 || (open_telnet_return = open_telnet_dcc(sock, ip, port)) < 0) {
       fclose(f);
       fclose(f);
       if (open_telnet_return != -1 && sock != -1)
       if (open_telnet_return != -1 && sock != -1)

+ 1 - 1
src/mod/update.mod/update.c

@@ -132,7 +132,7 @@ static void update_ufsend(int idx, char *par)
 #else
 #else
     sock = getsock(SOCK_BINARY); /* Don't buffer this -> mark binary. */
     sock = getsock(SOCK_BINARY); /* Don't buffer this -> mark binary. */
 #endif /* USE_IPV6 */
 #endif /* USE_IPV6 */
-    int open_telnet_return;
+    int open_telnet_return = 0;
     if (sock < 0 || (open_telnet_return = open_telnet_dcc(sock, ip, port)) < 0) {
     if (sock < 0 || (open_telnet_return = open_telnet_dcc(sock, ip, port)) < 0) {
       if (open_telnet_return != -1 && sock != -1)
       if (open_telnet_return != -1 && sock != -1)
         killsock(sock);
         killsock(sock);