Fix two gcc44 warnings.
authorFabian Keil <fk@fabiankeil.de>
Thu, 16 Oct 2008 16:34:21 +0000 (16:34 +0000)
committerFabian Keil <fk@fabiankeil.de>
Thu, 16 Oct 2008 16:34:21 +0000 (16:34 +0000)
gateway.c

index f3e7520..ec5b41b 100644 (file)
--- a/gateway.c
+++ b/gateway.c
@@ -1,4 +1,4 @@
-const char gateway_rcs[] = "$Id: gateway.c,v 1.31 2008/10/16 07:31:11 fabiankeil Exp $";
+const char gateway_rcs[] = "$Id: gateway.c,v 1.32 2008/10/16 16:27:22 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/gateway.c,v $
@@ -34,6 +34,9 @@ const char gateway_rcs[] = "$Id: gateway.c,v 1.31 2008/10/16 07:31:11 fabiankeil
  *
  * Revisions   :
  *    $Log: gateway.c,v $
+ *    Revision 1.32  2008/10/16 16:27:22  fabiankeil
+ *    Fix compiler warning.
+ *
  *    Revision 1.31  2008/10/16 07:31:11  fabiankeil
  *    - Factor socket_is_still_usable() out of get_reusable_connection().
  *    - If poll() isn't available, show a warning and assume the socket
@@ -1187,8 +1190,8 @@ static jb_socket socks5_connect(const struct forward_spec *fwd,
    /* Using strncpy because we really want the nul byte padding. */
    strncpy(cbuf + client_pos, target_host, sizeof(cbuf) - client_pos);
    client_pos += (hostlen & 0xffu);
-   cbuf[client_pos++] = (char)((target_port >> 8) & 0xffu);
-   cbuf[client_pos++] = (char)((target_port     ) & 0xffu);
+   cbuf[client_pos++] = (char)((target_port >> 8) & 0xff);
+   cbuf[client_pos++] = (char)((target_port     ) & 0xff);
 
    if (write_socket(sfd, cbuf, client_pos))
    {