* Code cleanup

* Add a comment in one appropriate place
 * Indent properly
This commit is contained in:
hubertf 2000-09-01 04:36:20 +00:00
parent c06c5a0348
commit 80c46f750e
1 changed files with 14 additions and 8 deletions

View File

@ -1,11 +1,11 @@
/* $NetBSD: perform.c,v 1.52 2000/06/16 23:49:17 sjg Exp $ */
/* $NetBSD: perform.c,v 1.53 2000/09/01 04:36:20 hubertf Exp $ */
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char *rcsid = "from FreeBSD Id: perform.c,v 1.44 1997/10/13 15:03:46 jkh Exp";
#else
__RCSID("$NetBSD: perform.c,v 1.52 2000/06/16 23:49:17 sjg Exp $");
__RCSID("$NetBSD: perform.c,v 1.53 2000/09/01 04:36:20 hubertf Exp $");
#endif
#endif
@ -140,10 +140,15 @@ pkg_do(char *pkg)
strcpy(buf, s);
tmppkg = buf;
}
if (!(Home = fileGetURL(NULL, tmppkg))) {
Home = fileGetURL(NULL, tmppkg);
if (Home == NULL) {
warnx("unable to fetch `%s' by URL", tmppkg);
if (ispkgpattern(pkg))
/*
* Seems we were not able to expand the pattern
* to something useful - bail out
*/
return 1;
if (strstr(pkg, ".tgz") != NULL) {
@ -152,7 +157,7 @@ pkg_do(char *pkg)
* clever - the user should give something sane!)
*/
return 1;
}
}
/* Second chance - maybe just a package name was given,
@ -173,10 +178,11 @@ pkg_do(char *pkg)
}
strcpy(buf, s);
tmppkg = buf;
if (!(Home = fileGetURL(NULL, tmppkg))) {
Home = fileGetURL(NULL, tmppkg);
if (Home == NULL) {
warnx("unable to fetch `%s' by URL", tmppkg);
return 1;
}
return 1;
}
}
}
where_to = Home;