Fix r231300: Use correct test so we only bail out on error instead of on non-error.

Also, fix a style bug.

Submitted by:	ache
Approved by:	cperciva
MFC after:	1 month
This commit is contained in:
Eitan Adler 2012-02-10 00:53:39 +00:00
parent db3273398b
commit 2eb318b31d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=231328

View File

@ -216,7 +216,7 @@ pkg_perform(char **pkgs)
/* Prefix should add an @cwd to the packing list */
if (Prefix) {
char resolved_prefix[PATH_MAX];
if (realpath(Prefix, resolved_prefix) != 0)
if (realpath(Prefix, resolved_prefix) == NULL)
err(EXIT_FAILURE, "couldn't resolve path for prefix: %s", Prefix);
add_plist_top(&plist, PLIST_CWD, resolved_prefix);
}