Cast 0xff to char before comparing it to another char.
authorGuus Sliepen <guus@tinc-vpn.org>
Sat, 9 Apr 2016 14:00:08 +0000 (16:00 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Sat, 9 Apr 2016 14:00:08 +0000 (16:00 +0200)
Clang warned about this.

src/proxy.c

index 165d3f34aa50dce224ff54631a178ff6569ee450..e30c1fb01cbc5212ada0f05beaaa43e8a2685541 100644 (file)
@@ -203,7 +203,7 @@ int receive_proxy_meta(connection_t *c, int start, int lenin) {
        case PROXY_SOCKS5:
                if(c->buflen < 2)
                        return 0;
-               if(c->buffer[0] != 0x05 || c->buffer[1] == 0xff) {
+               if(c->buffer[0] != 0x05 || c->buffer[1] == (char)0xff) {
                        logger(LOG_ERR, "Proxy authentication method rejected");
                        return -1;
                }