From a24b14b6bf2c04501ea84182a52caa5bf2ae7635 Mon Sep 17 00:00:00 2001 From: miod <> Date: Sun, 19 Jul 2015 18:29:31 +0000 Subject: Drop stupid (int) casts for the arguments of malloc() and friends. This is not 16-bit MS-DOS anymore. ok bcook@ tedu@ --- src/lib/libcrypto/bio/bf_buff.c | 8 ++++---- src/lib/libcrypto/bio/bf_lbuf.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/lib/libcrypto/bio') diff --git a/src/lib/libcrypto/bio/bf_buff.c b/src/lib/libcrypto/bio/bf_buff.c index 639e3f318d..588cc48a28 100644 --- a/src/lib/libcrypto/bio/bf_buff.c +++ b/src/lib/libcrypto/bio/bf_buff.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bf_buff.c,v 1.22 2015/07/19 01:18:17 beck Exp $ */ +/* $OpenBSD: bf_buff.c,v 1.23 2015/07/19 18:29:31 miod Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -339,7 +339,7 @@ buffer_ctrl(BIO *b, int cmd, long num, void *ptr) break; case BIO_C_SET_BUFF_READ_DATA: if (num > ctx->ibuf_size) { - p1 = malloc((int)num); + p1 = malloc(num); if (p1 == NULL) goto malloc_error; free(ctx->ibuf); @@ -369,12 +369,12 @@ buffer_ctrl(BIO *b, int cmd, long num, void *ptr) p1 = ctx->ibuf; p2 = ctx->obuf; if ((ibs > DEFAULT_BUFFER_SIZE) && (ibs != ctx->ibuf_size)) { - p1 = malloc((int)num); + p1 = malloc(num); if (p1 == NULL) goto malloc_error; } if ((obs > DEFAULT_BUFFER_SIZE) && (obs != ctx->obuf_size)) { - p2 = malloc((int)num); + p2 = malloc(num); if (p2 == NULL) { if (p1 != ctx->ibuf) free(p1); diff --git a/src/lib/libcrypto/bio/bf_lbuf.c b/src/lib/libcrypto/bio/bf_lbuf.c index e90b7f239f..7978fdb347 100644 --- a/src/lib/libcrypto/bio/bf_lbuf.c +++ b/src/lib/libcrypto/bio/bf_lbuf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bf_lbuf.c,v 1.12 2014/07/11 08:44:47 jsing Exp $ */ +/* $OpenBSD: bf_lbuf.c,v 1.13 2015/07/19 18:29:31 miod Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -280,7 +280,7 @@ linebuffer_ctrl(BIO *b, int cmd, long num, void *ptr) obs = (int)num; p = ctx->obuf; if ((obs > DEFAULT_LINEBUFFER_SIZE) && (obs != ctx->obuf_size)) { - p = malloc((int)num); + p = malloc(num); if (p == NULL) goto malloc_error; } -- cgit v1.2.3-55-g6feb