From owner-p4-projects@FreeBSD.ORG Thu Jul 24 15:30:28 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F10F21065676; Thu, 24 Jul 2008 15:30:27 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B424F106566B for ; Thu, 24 Jul 2008 15:30:27 +0000 (UTC) (envelope-from strauss@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A70F68FC13 for ; Thu, 24 Jul 2008 15:30:27 +0000 (UTC) (envelope-from strauss@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.2/8.14.2) with ESMTP id m6OFURYu068331 for ; Thu, 24 Jul 2008 15:30:27 GMT (envelope-from strauss@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.2/8.14.1/Submit) id m6OFUR5O068329 for perforce@freebsd.org; Thu, 24 Jul 2008 15:30:27 GMT (envelope-from strauss@FreeBSD.org) Date: Thu, 24 Jul 2008 15:30:27 GMT Message-Id: <200807241530.m6OFUR5O068329@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to strauss@FreeBSD.org using -f From: Anselm Strauss To: Perforce Change Reviews Cc: Subject: PERFORCE change 145817 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Jul 2008 15:30:28 -0000 http://perforce.freebsd.org/chv.cgi?CH=145817 Change 145817 by strauss@strauss_marvelman on 2008/07/24 15:30:14 Eliminated redundant type conversions (hope so ...) Affected files ... .. //depot/projects/soc2008/strauss_libarchive/libarchive/archive_write_set_format_zip.c#16 edit Differences ... ==== //depot/projects/soc2008/strauss_libarchive/libarchive/archive_write_set_format_zip.c#16 (text+ko) ==== @@ -161,8 +161,8 @@ const char *path; int ret; - zip = (struct zip *) a->format_data; - d = (struct zip_data_descriptor *) &zip->data_descriptor; + zip = a->format_data; + d = &zip->data_descriptor; path = archive_entry_pathname(entry); /* Append archive entry to the central directory data. @@ -230,8 +230,8 @@ /* Write the data descripter after file data has been written. */ int ret; - struct zip *zip = (struct zip *) a->format_data; - struct zip_data_descriptor *d = (struct zip_data_descriptor *) &zip->data_descriptor; + struct zip *zip = a->format_data; + struct zip_data_descriptor *d = &zip->data_descriptor; ret = (a->compressor.write)(a, d, sizeof(*d)); if (ret != ARCHIVE_OK) @@ -253,8 +253,8 @@ int entries; int ret; - zip = (struct zip *) a->format_data; - l = (struct zip_file_header_link *) zip->central_directory; + zip = a->format_data; + l = zip->central_directory; /* * Formatting central directory file header fields that are fixed for all entries. @@ -316,8 +316,8 @@ struct zip *zip; struct zip_file_header_link *l; - zip = (struct zip *)a->format_data; - l = (struct zip_file_header_link *) zip->central_directory; + zip = a->format_data; + l = zip->central_directory; while (l != NULL) { l = l->next; free(l);