summaryrefslogtreecommitdiff
path: root/bin/ln
diff options
context:
space:
mode:
authorTim van der Molen <tim@cvs.openbsd.org>2016-05-10 20:20:44 +0000
committerTim van der Molen <tim@cvs.openbsd.org>2016-05-10 20:20:44 +0000
commit044dede1e04ce19911ed3ae812610b9c5aa06a32 (patch)
treeab845068081cd54d4e30872c7df8c790c876f560 /bin/ln
parent869ce5a1007a9d00bbac5121d825c80be70f9dde (diff)
Fix operator precedence error; OK guenther@ millert@
Diffstat (limited to 'bin/ln')
-rw-r--r--bin/ln/ln.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/ln/ln.c b/bin/ln/ln.c
index 329b3d4147c..ae0d34ed383 100644
--- a/bin/ln/ln.c
+++ b/bin/ln/ln.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ln.c,v 1.23 2015/10/10 22:36:46 doug Exp $ */
+/* $OpenBSD: ln.c,v 1.24 2016/05/10 20:20:43 tim Exp $ */
/* $NetBSD: ln.c,v 1.10 1995/03/21 09:06:10 cgd Exp $ */
/*
@@ -179,9 +179,9 @@ linkit(char *target, char *source, int isdir)
* Attempt the link.
*/
if ((fflag && unlink(source) < 0 && errno != ENOENT) ||
- sflag ? symlink(target, source) :
+ (sflag ? symlink(target, source) :
linkat(AT_FDCWD, target, AT_FDCWD, source,
- Pflag ? 0 : AT_SYMLINK_FOLLOW)) {
+ Pflag ? 0 : AT_SYMLINK_FOLLOW))) {
warn("%s", source);
return (1);
}