aboutsummaryrefslogtreecommitdiffstats
path: root/ssl/s2_clnt.c
diff options
context:
space:
mode:
authorGeoff Thorpe <geoff@openssl.org>2003-10-29 20:24:15 +0000
committerGeoff Thorpe <geoff@openssl.org>2003-10-29 20:24:15 +0000
commit27545970134d703ed96027aac9b67eced124eec3 (patch)
tree2f878acf303cc26e3b6db6a0ec25c10c91e3d32d /ssl/s2_clnt.c
parent2ce90b9b7481381dff584726d84345a0260ca4d1 (diff)
downloadopenssl-27545970134d703ed96027aac9b67eced124eec3.tar.gz
A general spring-cleaning (in autumn) to fix up signed/unsigned warnings.
I have tried to convert 'len' type variable declarations to unsigned as a means to address these warnings when appropriate, but when in doubt I have used casts in the comparisons instead. The better solution (that would get us all lynched by API users) would be to go through and convert all the function prototypes and structure definitions to use unsigned variables except when signed is necessary. The proliferation of (signed) "int" for strictly non-negative uses is unfortunate.
Diffstat (limited to 'ssl/s2_clnt.c')
-rw-r--r--ssl/s2_clnt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ssl/s2_clnt.c b/ssl/s2_clnt.c
index 1d24dedc91..62e83afb35 100644
--- a/ssl/s2_clnt.c
+++ b/ssl/s2_clnt.c
@@ -668,7 +668,7 @@ static int client_master_key(SSL *s)
sess->master_key_length=i;
if (i > 0)
{
- if (i > sizeof sess->master_key)
+ if (i > (int)sizeof(sess->master_key))
{
ssl2_return_error(s, SSL2_PE_UNDEFINED_ERROR);
SSLerr(SSL_F_CLIENT_MASTER_KEY, ERR_R_INTERNAL_ERROR);
@@ -688,7 +688,7 @@ static int client_master_key(SSL *s)
else
enc=i;
- if (i < enc)
+ if ((int)i < enc)
{
ssl2_return_error(s,SSL2_PE_UNDEFINED_ERROR);
SSLerr(SSL_F_CLIENT_MASTER_KEY,SSL_R_CIPHER_TABLE_SRC_ERROR);
@@ -717,7 +717,7 @@ static int client_master_key(SSL *s)
d+=enc;
karg=sess->key_arg_length;
s2n(karg,p); /* key arg size */
- if (karg > sizeof sess->key_arg)
+ if (karg > (int)sizeof(sess->key_arg))
{
ssl2_return_error(s,SSL2_PE_UNDEFINED_ERROR);
SSLerr(SSL_F_CLIENT_MASTER_KEY, ERR_R_INTERNAL_ERROR);