[openssl-commits] [openssl] master update

Rich Salz rsalz at openssl.org
Tue Aug 15 13:43:26 UTC 2017


The branch master has been updated
       via  12997aa984cf0e5def1045fd22d7b0675caaa0a1 (commit)
      from  b158049cbdff7efa9afd93eb55bb7df95c0f385f (commit)


- Log -----------------------------------------------------------------
commit 12997aa984cf0e5def1045fd22d7b0675caaa0a1
Author: Rich Salz <rsalz at openssl.org>
Date:   Tue Aug 15 09:42:38 2017 -0400

    Revert "Add some casts for %j"
    
    This reverts commit c4d2e483a39176a476c56d35879423fe6e33c0cd.
    
    Reviewed-by: Ben Kaduk <kaduk at mit.edu>
    (Merged from https://github.com/openssl/openssl/pull/4160)

-----------------------------------------------------------------------

Summary of changes:
 apps/enc.c                |  6 ++----
 apps/s_client.c           |  4 ++--
 crypto/asn1/x_int64.c     |  4 ++--
 test/constant_time_test.c | 10 ++++------
 4 files changed, 10 insertions(+), 14 deletions(-)

diff --git a/apps/enc.c b/apps/enc.c
index 9729d10..db5d3a2 100644
--- a/apps/enc.c
+++ b/apps/enc.c
@@ -555,10 +555,8 @@ int enc_main(int argc, char **argv)
 
     ret = 0;
     if (verbose) {
-        BIO_printf(bio_err, "bytes read   : %8ju\n",
-                   (uintmax_t)BIO_number_read(in));
-        BIO_printf(bio_err, "bytes written: %8ju\n",
-                   (uintmax_t)BIO_number_written(out));
+        BIO_printf(bio_err, "bytes read   : %8ju\n", BIO_number_read(in));
+        BIO_printf(bio_err, "bytes written: %8ju\n", BIO_number_written(out));
     }
  end:
     ERR_print_errors(bio_err);
diff --git a/apps/s_client.c b/apps/s_client.c
index c322dee..45464a4 100644
--- a/apps/s_client.c
+++ b/apps/s_client.c
@@ -3118,8 +3118,8 @@ static void print_stuff(BIO *bio, SSL *s, int full)
         BIO_printf(bio,
                    "---\nSSL handshake has read %ju bytes "
                    "and written %ju bytes\n",
-                   (uintmax_t)BIO_number_read(SSL_get_rbio(s)),
-                   (uintmax_t)BIO_number_written(SSL_get_wbio(s)));
+                   BIO_number_read(SSL_get_rbio(s)),
+                   BIO_number_written(SSL_get_wbio(s)));
     }
     print_verify_detail(s, bio);
     BIO_printf(bio, (SSL_session_reused(s) ? "---\nReused, " : "---\nNew, "));
diff --git a/crypto/asn1/x_int64.c b/crypto/asn1/x_int64.c
index 8f06475..714e2f7 100644
--- a/crypto/asn1/x_int64.c
+++ b/crypto/asn1/x_int64.c
@@ -102,8 +102,8 @@ static int uint64_print(BIO *out, ASN1_VALUE **pval, const ASN1_ITEM *it,
                         int indent, const ASN1_PCTX *pctx)
 {
     if ((it->size & INTxx_FLAG_SIGNED) == INTxx_FLAG_SIGNED)
-        return BIO_printf(out, "%jd\n", (intmax_t)**(int64_t **)pval);
-    return BIO_printf(out, "%ju\n", (uintmax_t)**(uint64_t **)pval);
+        return BIO_printf(out, "%jd\n", **(int64_t **)pval);
+    return BIO_printf(out, "%ju\n", **(uint64_t **)pval);
 }
 
 /* 32-bit variants */
diff --git a/test/constant_time_test.c b/test/constant_time_test.c
index ef391b9..8575194 100644
--- a/test/constant_time_test.c
+++ b/test/constant_time_test.c
@@ -66,11 +66,11 @@ static int test_binary_op_64(uint64_t (*op)(uint64_t a, uint64_t b),
 
     if (is_true && c != CONSTTIME_TRUE_64) {
         TEST_error("TRUE %s op failed", op_name);
-        BIO_printf(bio_err, "a=%jx b=%jx\n", (uintmax_t)a, (uintmax_t)b);
+        BIO_printf(bio_err, "a=%jx b=%jx\n", a, b);
         return 0;
     } else if (!is_true && c != CONSTTIME_FALSE_64) {
         TEST_error("FALSE %s op failed", op_name);
-        BIO_printf(bio_err, "a=%jx b=%jx\n", (uintmax_t)a, (uintmax_t)b);
+        BIO_printf(bio_err, "a=%jx b=%jx\n", a, b);
         return 0;
     }
     return 1;
@@ -137,14 +137,12 @@ static int test_select_64(uint64_t a, uint64_t b)
 
     if (selected != a) {
         TEST_error("test_select_64 TRUE failed");
-        BIO_printf(bio_err, "a=%jx b=%jx got %jx wanted a\n",
-                   (uintmax_t)a, (uintmax_t)b, (uintmax_t)selected);
+        BIO_printf(bio_err, "a=%jx b=%jx got %jx wanted a\n", a, b, selected);
         return 0;
     }
     selected = constant_time_select_64(CONSTTIME_FALSE_64, a, b);
     if (selected != b) {
-        BIO_printf(bio_err, "a=%jx b=%jx got %jx wanted b\n",
-                   (uintmax_t)a, (uintmax_t)b, (uintmax_t)selected);
+        BIO_printf(bio_err, "a=%jx b=%jx got %jx wanted b\n", a, b, selected);
         return 0;
     }
     return 1;


More information about the openssl-commits mailing list