volscan: avoid printing null mount-point cellname
authorMichael Meffie <mmeffie@sinenomine.net>
Wed, 4 Sep 2013 19:10:16 +0000 (15:10 -0400)
committerD Brashear <shadow@your-file-system.com>
Tue, 25 Mar 2014 16:57:11 +0000 (09:57 -0700)
The 'mcell' field is null when there is no cell set in the mount point,
so do not try to print it.

Change-Id: I363310665313f7bbcca783a4d9be87aaa7b0a8fe
Reviewed-on: http://gerrit.openafs.org/10226
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>

src/vol/vol-info.c

index 0c8b2d1..8ba8c7a 100644 (file)
@@ -2495,7 +2495,7 @@ PrintColumns(struct VnodeDetails *vdp, const char *desc)
            break;
        case col_mcell:
            printf("%s",
-                  (vdp->t == VNODE_U_MOUNT ? vdp->u.mnt.cell : PLACEHOLDER));
+                  (vdp->t == VNODE_U_MOUNT && vdp->u.mnt.cell ? vdp->u.mnt.cell : PLACEHOLDER));
            break;
        case col_mvol:
            printf("%s",