summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bio/bf_buff.c
diff options
context:
space:
mode:
authormiod <>2015-07-19 18:29:31 +0000
committermiod <>2015-07-19 18:29:31 +0000
commit243442e0f6d87748dcaccc2d2d3bf5605be3e3a9 (patch)
tree7d71f138b5b5706a448942547e5154bd651f174c /src/lib/libcrypto/bio/bf_buff.c
parent7adb4eeffce8c01c0c9ae40701483cf6eb71d9de (diff)
downloadopenbsd-243442e0f6d87748dcaccc2d2d3bf5605be3e3a9.tar.gz
openbsd-243442e0f6d87748dcaccc2d2d3bf5605be3e3a9.tar.bz2
openbsd-243442e0f6d87748dcaccc2d2d3bf5605be3e3a9.zip
Drop stupid (int) casts for the arguments of malloc() and friends. This is
not 16-bit MS-DOS anymore. ok bcook@ tedu@
Diffstat (limited to 'src/lib/libcrypto/bio/bf_buff.c')
-rw-r--r--src/lib/libcrypto/bio/bf_buff.c8
1 files changed, 4 insertions, 4 deletions
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 @@
1/* $OpenBSD: bf_buff.c,v 1.22 2015/07/19 01:18:17 beck Exp $ */ 1/* $OpenBSD: bf_buff.c,v 1.23 2015/07/19 18:29:31 miod Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -339,7 +339,7 @@ buffer_ctrl(BIO *b, int cmd, long num, void *ptr)
339 break; 339 break;
340 case BIO_C_SET_BUFF_READ_DATA: 340 case BIO_C_SET_BUFF_READ_DATA:
341 if (num > ctx->ibuf_size) { 341 if (num > ctx->ibuf_size) {
342 p1 = malloc((int)num); 342 p1 = malloc(num);
343 if (p1 == NULL) 343 if (p1 == NULL)
344 goto malloc_error; 344 goto malloc_error;
345 free(ctx->ibuf); 345 free(ctx->ibuf);
@@ -369,12 +369,12 @@ buffer_ctrl(BIO *b, int cmd, long num, void *ptr)
369 p1 = ctx->ibuf; 369 p1 = ctx->ibuf;
370 p2 = ctx->obuf; 370 p2 = ctx->obuf;
371 if ((ibs > DEFAULT_BUFFER_SIZE) && (ibs != ctx->ibuf_size)) { 371 if ((ibs > DEFAULT_BUFFER_SIZE) && (ibs != ctx->ibuf_size)) {
372 p1 = malloc((int)num); 372 p1 = malloc(num);
373 if (p1 == NULL) 373 if (p1 == NULL)
374 goto malloc_error; 374 goto malloc_error;
375 } 375 }
376 if ((obs > DEFAULT_BUFFER_SIZE) && (obs != ctx->obuf_size)) { 376 if ((obs > DEFAULT_BUFFER_SIZE) && (obs != ctx->obuf_size)) {
377 p2 = malloc((int)num); 377 p2 = malloc(num);
378 if (p2 == NULL) { 378 if (p2 == NULL) {
379 if (p1 != ctx->ibuf) 379 if (p1 != ctx->ibuf)
380 free(p1); 380 free(p1);