From 691b70b45c19b10754cea14912bb54a12fd5d359 Mon Sep 17 00:00:00 2001 From: Visa Hankala Date: Sat, 29 Sep 2018 04:29:49 +0000 Subject: Use atomic operations to update vfc_refcount. Change the field's type to unsigned int. OK deraadt@ --- sbin/sysctl/sysctl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sbin/sysctl') diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c index b2c64d41a32..9f0255e2c77 100644 --- a/sbin/sysctl/sysctl.c +++ b/sbin/sysctl/sysctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sysctl.c,v 1.236 2018/09/22 02:20:44 visa Exp $ */ +/* $OpenBSD: sysctl.c,v 1.237 2018/09/29 04:29:48 visa Exp $ */ /* $NetBSD: sysctl.c,v 1.9 1995/09/30 07:12:50 thorpej Exp $ */ /* @@ -1293,11 +1293,11 @@ sysctl_vfsgen(char *string, char **bufpp, int mib[], int flags, int *typep) if (flags == 0 && vfc.vfc_refcount == 0) return -1; if (!nflag) - fprintf(stdout, "%s has %d mounted instance%s\n", + fprintf(stdout, "%s has %u mounted instance%s\n", string, vfc.vfc_refcount, vfc.vfc_refcount != 1 ? "s" : ""); else - fprintf(stdout, "%d\n", vfc.vfc_refcount); + fprintf(stdout, "%u\n", vfc.vfc_refcount); return -1; } -- cgit v1.2.3