summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_usrreq.c
diff options
context:
space:
mode:
authorhsu <hsu@FreeBSD.org>2002-12-25 07:59:39 +0000
committerhsu <hsu@FreeBSD.org>2002-12-25 07:59:39 +0000
commit26d0fd77c32e86119e3e64730138db36b31d7031 (patch)
tree39cc8a1da2763a092db54d6dc36d5edd73174a93 /sys/kern/uipc_usrreq.c
parent449c7cf2ec0ef490d47057b98cac0fbdfe2f71d9 (diff)
downloadFreeBSD-src-26d0fd77c32e86119e3e64730138db36b31d7031.zip
FreeBSD-src-26d0fd77c32e86119e3e64730138db36b31d7031.tar.gz
Ensure that the made-up inode number for a Unix domain socket is persistent.
Diffstat (limited to 'sys/kern/uipc_usrreq.c')
-rw-r--r--sys/kern/uipc_usrreq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c
index 844d03d..5ca7c39 100644
--- a/sys/kern/uipc_usrreq.c
+++ b/sys/kern/uipc_usrreq.c
@@ -404,7 +404,7 @@ uipc_sense(struct socket *so, struct stat *sb)
}
sb->st_dev = NOUDEV;
if (unp->unp_ino == 0)
- unp->unp_ino = unp_ino++;
+ unp->unp_ino = (++unp_ino == 0) ? ++unp_ino : unp_ino;
sb->st_ino = unp->unp_ino;
return (0);
}
OpenPOWER on IntegriCloud