summaryrefslogtreecommitdiffstats
path: root/bin/ln
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1994-09-20 06:28:16 +0000
committerphk <phk@FreeBSD.org>1994-09-20 06:28:16 +0000
commit2c9f4788e2dd4a0f0dfc18596989f5ba389f7430 (patch)
treefba77f3a7347094d09b7b023f84f9233ed58bd66 /bin/ln
parent1da6fa08f8206df2750dd100912f64bc3b508afd (diff)
downloadFreeBSD-src-2c9f4788e2dd4a0f0dfc18596989f5ba389f7430.zip
FreeBSD-src-2c9f4788e2dd4a0f0dfc18596989f5ba389f7430.tar.gz
/home/phk/jg
Diffstat (limited to 'bin/ln')
-rw-r--r--bin/ln/ln.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/ln/ln.c b/bin/ln/ln.c
index b39e710..9be9824 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);
}
OpenPOWER on IntegriCloud