From 3a1552326096fc131b570be1f9b594834ca330bd Mon Sep 17 00:00:00 2001
From: Poul-Henning Kamp <phk@FreeBSD.org>
Date: Tue, 20 Sep 1994 06:28:16 +0000
Subject: [PATCH] /home/phk/jg

---
 bin/ln/ln.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/ln/ln.c b/bin/ln/ln.c
index b39e710c89ad..9be982409096 100644
--- a/bin/ln/ln.c
+++ b/bin/ln/ln.c
@@ -133,7 +133,7 @@ linkit(target, source, isdir)
 	}
 
 	/* If the source is a directory, append the target's name. */
-	if (isdir || (exists = !stat(source, &sb)) && S_ISDIR(sb.st_mode)) {
+	if (isdir || ((exists = !stat(source, &sb)) && S_ISDIR(sb.st_mode))) {
 		if ((p = strrchr(target, '/')) == NULL)
 			p = target;
 		else
@@ -148,7 +148,7 @@ linkit(target, source, isdir)
 	 * If the file exists, and -f was specified, unlink it.
 	 * Attempt the link.
 	 */
-	if (fflag && exists && unlink(source) || (*linkf)(target, source)) {
+	if (fflag && exists && (unlink(source) || (*linkf)(target, source))) {
 		warn("%s", source);
 		return (1);
 	}