pkg_do(): only use cp2 if it's really set to something useful

Coverity CID 1176
This commit is contained in:
hubertf 2006-03-17 02:31:44 +00:00
parent 21831d5e1d
commit 3c5de91c39
1 changed files with 4 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: perform.c,v 1.67 2005/11/23 04:59:14 ben Exp $ */
/* $NetBSD: perform.c,v 1.68 2006/03/17 02:31:44 hubertf Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@ -14,7 +14,7 @@
#if 0
static const char *rcsid = "from FreeBSD Id: perform.c,v 1.23 1997/10/13 15:03:53 jkh Exp";
#else
__RCSID("$NetBSD: perform.c,v 1.67 2005/11/23 04:59:14 ben Exp $");
__RCSID("$NetBSD: perform.c,v 1.68 2006/03/17 02:31:44 hubertf Exp $");
#endif
#endif
@ -112,8 +112,9 @@ pkg_do(char *pkg)
if ((cp2 = fileGetURL(cp)) != NULL) {
strlcpy(fname, cp2, sizeof(fname));
isTMP = TRUE;
strcpy(PlayPen, cp2);
}
strcpy(PlayPen, cp2);
} else {
/*
* Apply a crude heuristic to see how much space the package will