From owner-svn-src-all@FreeBSD.ORG Mon Jan 4 14:34:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC06010656FE; Mon, 4 Jan 2010 14:34:01 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C08738FC08; Mon, 4 Jan 2010 14:34:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o04EY1Ic085610; Mon, 4 Jan 2010 14:34:01 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o04EY1Qf085608; Mon, 4 Jan 2010 14:34:01 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001041434.o04EY1Qf085608@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 4 Jan 2010 14:34:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201496 - stable/6/sys/opencrypto X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 14:34:02 -0000 Author: bz Date: Mon Jan 4 14:34:01 2010 New Revision: 201496 URL: http://svn.freebsd.org/changeset/base/201496 Log: "Merge" a single file out of r184205 by des@ w/o placing mergeinfo to be able to keep files in sync between branches and still allow a possible of the entire commit: Retire the MALLOC and FREE macros. They are an abomination unto style(9). Modified: stable/6/sys/opencrypto/deflate.c Modified: stable/6/sys/opencrypto/deflate.c ============================================================================== --- stable/6/sys/opencrypto/deflate.c Mon Jan 4 12:39:42 2010 (r201495) +++ stable/6/sys/opencrypto/deflate.c Mon Jan 4 14:34:01 2010 (r201496) @@ -79,7 +79,7 @@ deflate_global(data, size, decomp, out) zbuf.avail_in = size; /* Total length of data to be processed */ if (!decomp) { - MALLOC(buf[i].out, u_int8_t *, (u_long) size, M_CRYPTO_DATA, + buf[i].out = malloc((u_long) size, M_CRYPTO_DATA, M_NOWAIT); if (buf[i].out == NULL) goto bad; @@ -94,7 +94,7 @@ deflate_global(data, size, decomp, out) * updated while the decompression is going on */ - MALLOC(buf[i].out, u_int8_t *, (u_long) (size * 4), + buf[i].out = malloc((u_long) (size * 4), M_CRYPTO_DATA, M_NOWAIT); if (buf[i].out == NULL) goto bad; @@ -121,7 +121,7 @@ deflate_global(data, size, decomp, out) goto end; else if (zbuf.avail_out == 0 && i < (ZBUF - 1)) { /* we need more output space, allocate size */ - MALLOC(buf[i].out, u_int8_t *, (u_long) size, + buf[i].out = malloc((u_long) size, M_CRYPTO_DATA, M_NOWAIT); if (buf[i].out == NULL) goto bad; @@ -137,7 +137,7 @@ deflate_global(data, size, decomp, out) end: result = count = zbuf.total_out; - MALLOC(*out, u_int8_t *, (u_long) result, M_CRYPTO_DATA, M_NOWAIT); + *out = malloc((u_long) result, M_CRYPTO_DATA, M_NOWAIT); if (*out == NULL) goto bad; if (decomp) @@ -149,13 +149,13 @@ end: if (count > buf[j].size) { bcopy(buf[j].out, *out, buf[j].size); *out += buf[j].size; - FREE(buf[j].out, M_CRYPTO_DATA); + free(buf[j].out, M_CRYPTO_DATA); count -= buf[j].size; } else { /* it should be the last buffer */ bcopy(buf[j].out, *out, count); *out += count; - FREE(buf[j].out, M_CRYPTO_DATA); + free(buf[j].out, M_CRYPTO_DATA); count = 0; } } @@ -165,7 +165,7 @@ end: bad: *out = NULL; for (j = 0; buf[j].flag != 0; j++) - FREE(buf[j].out, M_CRYPTO_DATA); + free(buf[j].out, M_CRYPTO_DATA); if (decomp) inflateEnd(&zbuf); else