X-Git-Url: https://git.saurik.com/apple/file_cmds.git/blobdiff_plain/864a4b6e4495e8bb9744303352b4f19fccc90738..39aaa94bf0a1c68b3fe15e3622c96766f0f22ff2:/compress/compress.c diff --git a/compress/compress.c b/compress/compress.c index 03311f9..0732fa4 100644 --- a/compress/compress.c +++ b/compress/compress.c @@ -10,10 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. @@ -31,8 +27,9 @@ * SUCH DAMAGE. */ +#include #ifndef lint -static const char copyright[] = +__used static const char copyright[] = "@(#) Copyright (c) 1992, 1993\n\ The Regents of the University of California. All rights reserved.\n"; #endif @@ -44,7 +41,7 @@ static char sccsid[] = "@(#)compress.c 8.2 (Berkeley) 1/7/94"; #endif #include -__FBSDID("$FreeBSD: src/usr.bin/compress/compress.c,v 1.21 2003/06/14 13:41:31 trhodes Exp $"); +__FBSDID("$FreeBSD: src/usr.bin/compress/compress.c,v 1.23 2010/12/11 08:32:16 joel Exp $"); #include #include @@ -205,7 +202,7 @@ compress(const char *in, const char *out, int bits) { size_t nr; struct stat isb, sb; - FILE *ifp, *ofp; + FILE *ifp = NULL, *ofp = NULL; int exists, isreg, oreg; u_char buf[1024]; @@ -216,7 +213,6 @@ compress(const char *in, const char *out, int bits) } isreg = oreg = !exists || S_ISREG(sb.st_mode); - ifp = ofp = NULL; if ((ifp = fopen(in, "r")) == NULL) { cwarn("%s", in); return; @@ -308,7 +304,7 @@ decompress(const char *in, const char *out, int bits) } isreg = oreg = !exists || S_ISREG(sb.st_mode); - ifp = ofp = NULL; + ofp = NULL; if ((ifp = zopen(in, "r", bits)) == NULL) { cwarn("%s", in); return;