aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_install/create
diff options
context:
space:
mode:
authorBill Fumerola <billf@FreeBSD.org>1999-08-11 20:55:42 +0000
committerBill Fumerola <billf@FreeBSD.org>1999-08-11 20:55:42 +0000
commit0845a96cd0c2cd328c36b72812979b47f39f38b5 (patch)
treeb073bf149907eb2d45a7b1cd4b9493ba96202969 /usr.sbin/pkg_install/create
parentfdf4e8b30c692a3abf7d5f13def2d5ce12c8174c (diff)
downloadsrc-0845a96cd0c2cd328c36b72812979b47f39f38b5.tar.gz
src-0845a96cd0c2cd328c36b72812979b47f39f38b5.zip
-Wall fixes. Ambigious if/elses, uninitialized values, missing headers,
missing prototypes, and empty format strings.
Notes
Notes: svn path=/head/; revision=49637
Diffstat (limited to 'usr.sbin/pkg_install/create')
-rw-r--r--usr.sbin/pkg_install/create/perform.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/pkg_install/create/perform.c b/usr.sbin/pkg_install/create/perform.c
index 5e7443d9a396..d211a57293c9 100644
--- a/usr.sbin/pkg_install/create/perform.c
+++ b/usr.sbin/pkg_install/create/perform.c
@@ -1,6 +1,6 @@
#ifndef lint
static const char rcsid[] =
- "$Id: perform.c,v 1.46 1998/12/05 06:28:58 asami Exp $";
+ "$Id: perform.c,v 1.47 1998/12/16 13:59:30 jkh Exp $";
#endif
/*
@@ -46,7 +46,7 @@ pkg_perform(char **pkgs)
Package plist;
int len;
char *suf;
- int compress;
+ int compress = 0;
/* Preliminary setup */
sanity_check();
@@ -67,7 +67,7 @@ pkg_perform(char **pkgs)
/* chop suffix off if already specified, remembering if we want to compress */
len = strlen(pkg);
- if (len > 4)
+ if (len > 4) {
if (!strcmp(&pkg[len - 4], ".tgz")) {
compress = TRUE;
pkg[len - 4] = '\0';
@@ -79,6 +79,7 @@ pkg_perform(char **pkgs)
else
/* default is to compress packages */
compress = TRUE;
+ }
if (compress)
suf = "tgz";
else