Skip to content

Commit

Permalink
Revert "remove unnecessary long casts"
Browse files Browse the repository at this point in the history
This reverts commit 1bad32a.
  • Loading branch information
krono committed Jul 29, 2015
1 parent 1bad32a commit e1aae6d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/unix/sqUnixOpenSSL.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ sqInt sqCopyBioSSL(sqSSL *ssl, BIO *bio, char *dstBuf, sqInt dstLen) {
int nbytes = BIO_ctrl_pending(bio);

if(ssl->loglevel) printf("sqCopyBioSSL: %d bytes pending; buffer size %ld\n",
nbytes, dstLen);
nbytes, (long)dstLen);
if(nbytes > dstLen) return -1;
return BIO_read(bio, dstBuf, dstLen);
}
Expand Down Expand Up @@ -176,7 +176,7 @@ sqInt sqConnectSSL(sqInt handle, char* srcBuf, sqInt srcLen, char *dstBuf, sqInt
SSL_set_connect_state(ssl->ssl);
}

if(ssl->loglevel) printf("sqConnectSSL: BIO_write %ld bytes\n", srcLen);
if(ssl->loglevel) printf("sqConnectSSL: BIO_write %ld bytes\n", (long)srcLen);

n = BIO_write(ssl->bioRead, srcBuf, srcLen);

Expand Down Expand Up @@ -263,7 +263,7 @@ sqInt sqAcceptSSL(sqInt handle, char* srcBuf, sqInt srcLen, char *dstBuf, sqInt
SSL_set_accept_state(ssl->ssl);
}

if(ssl->loglevel) printf("sqAcceptSSL: BIO_write %ld bytes\n", srcLen);
if(ssl->loglevel) printf("sqAcceptSSL: BIO_write %ld bytes\n", (long)srcLen);

n = BIO_write(ssl->bioRead, srcBuf, srcLen);

Expand Down Expand Up @@ -333,7 +333,7 @@ sqInt sqEncryptSSL(sqInt handle, char* srcBuf, sqInt srcLen, char *dstBuf, sqInt

if(ssl == NULL || ssl->state != SQSSL_CONNECTED) return SQSSL_INVALID_STATE;

if(ssl->loglevel) printf("sqEncryptSSL: Encrypting %ld bytes\n", srcLen);
if(ssl->loglevel) printf("sqEncryptSSL: Encrypting %ld bytes\n", (long)srcLen);

nbytes = SSL_write(ssl->ssl, srcBuf, srcLen);
if(nbytes != srcLen) return SQSSL_GENERIC_ERROR;
Expand Down Expand Up @@ -445,7 +445,7 @@ sqInt sqGetIntPropertySSL(sqInt handle, sqInt propID) {
case SQSSL_PROP_VERSION: return SQSSL_VERSION;
case SQSSL_PROP_LOGLEVEL: return ssl->loglevel;
default:
if(ssl->loglevel) printf("sqGetIntPropertySSL: Unknown property ID %ld\n", propID);
if(ssl->loglevel) printf("sqGetIntPropertySSL: Unknown property ID %ld\n", (long)propID);
return 0;
}
return 0;
Expand All @@ -465,7 +465,7 @@ sqInt sqSetIntPropertySSL(sqInt handle, sqInt propID, sqInt propValue) {
switch(propID) {
case SQSSL_PROP_LOGLEVEL: ssl->loglevel = propValue; break;
default:
if(ssl->loglevel) printf("sqSetIntPropertySSL: Unknown property ID %ld\n", propID);
if(ssl->loglevel) printf("sqSetIntPropertySSL: Unknown property ID %ld\n", (long)propID);
return 0;
}
return 1;
Expand Down

0 comments on commit e1aae6d

Please sign in to comment.