aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorEitan Adler <eadler@FreeBSD.org>2012-02-10 00:53:39 +0000
committerEitan Adler <eadler@FreeBSD.org>2012-02-10 00:53:39 +0000
commit2eb318b31dcb552cabdec6e1f1e8c75f094401ae (patch)
tree84cca856f9cd0f98ddfb33c3bf1ea7e57b76546b /usr.sbin
parentdb3273398b408f29b088b0b4ceaf65ce1a58d936 (diff)
downloadsrc-2eb318b31dcb552cabdec6e1f1e8c75f094401ae.tar.gz
src-2eb318b31dcb552cabdec6e1f1e8c75f094401ae.zip
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
Notes
Notes: svn path=/head/; revision=231328
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pkg_install/create/perform.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/pkg_install/create/perform.c b/usr.sbin/pkg_install/create/perform.c
index bfe4ac4dbd11..44095518b0e0 100644
--- a/usr.sbin/pkg_install/create/perform.c
+++ b/usr.sbin/pkg_install/create/perform.c
@@ -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);
}