summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2017-07-15 13:47:21 +0300
committerGordon Ross <gwr@nexenta.com>2018-04-13 15:38:35 -0400
commited1b18c7444d27a1c8637e59ba0b8b360902050b (patch)
tree26e52346950135603fd078ad2807f23596c47333
parent4e72ade1d48747d1105e26d42fc4787278f8f35e (diff)
downloadillumos-joyent-ed1b18c7444d27a1c8637e59ba0b8b360902050b.tar.gz
9346 autofs: comparison between pointer and zero character constant
Reviewed by: Yuri Pankov <yuripv@yuripv.net> Reviewed by: Marcel Telka <marcel@telka.sk> Approved by: Gordon Ross <gwr@nexenta.com>
-rw-r--r--usr/src/uts/common/fs/autofs/auto_subr.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr/src/uts/common/fs/autofs/auto_subr.c b/usr/src/uts/common/fs/autofs/auto_subr.c
index c9da46b66b..4e3280dfe1 100644
--- a/usr/src/uts/common/fs/autofs/auto_subr.c
+++ b/usr/src/uts/common/fs/autofs/auto_subr.c
@@ -162,11 +162,13 @@ auto_lookup_aux(fnnode_t *fnp, char *name, cred_t *cred)
bzero(&link, sizeof (link));
error = auto_lookup_request(fnip, name, &link, TRUE, &mountreq, cred);
if (!error) {
- if (link.link != NULL || link.link != '\0') {
+ if (link.link != NULL) {
+ error = ENOENT;
/*
* This node should be a symlink
*/
- error = auto_perform_link(fnp, &link, cred);
+ if (*link.link != '\0')
+ error = auto_perform_link(fnp, &link, cred);
} else if (mountreq) {
/*
* The automount daemon is requesting a mount,