]> Sergey Matveev's repositories - dht-bootstrap.git/blobdiff - dht-bootstrap.c
Remove unused global variable: ones.
[dht-bootstrap.git] / dht-bootstrap.c
index 1c5d37513b877902db006519df86b5a858b21b44..9a436705dfb85535ebc97fc5eba08197b374dd7a 100644 (file)
@@ -114,11 +114,6 @@ static int parse_message(const unsigned char *buf, int buflen,
                          int *want_return);
 
 static const unsigned char zeroes[20] = {0};
-static const unsigned char ones[20] = {
-    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-    0xFF, 0xFF, 0xFF, 0xFF
-};
 static const unsigned char v4prefix[16] = {
     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFF, 0xFF, 0, 0, 0, 0
 };
@@ -599,7 +594,7 @@ main(int argc, char **argv)
             unsigned short port;
             unsigned char values[2048], values6[2048];
             int values_len = 2048, values6_len = 2048;
-            int want, want4, want6;
+            int want;
             struct sockaddr_storage source_storage;
             struct sockaddr *source = (struct sockaddr*)&source_storage;
             socklen_t sourcelen = sizeof(source_storage);
@@ -645,14 +640,6 @@ main(int argc, char **argv)
                 }
             }
 
-            if(want > 0) {
-                want4 = (want & WANT4);
-                want6 = (want & WANT6);
-            } else {
-                want4 = source->sa_family == AF_INET;
-                want6 = source->sa_family == AF_INET6;
-            }
-
             switch(message) {
             case REPLY:
                 if(tid_len != 4) {