Module Name: src
Committed By: pgoyette
Date: Sun Jul 8 06:21:42 UTC 2018
Modified Files:
src/sys/sys: types.h
Log Message:
Use a different, type-insensitive idiom for CLR().
As discussed on IRC and proposed by dholland@, the existing idiom is
type-sensitive, and will likely fail silently when the flags variable
is a 64-bit type.
No functional change intended. If anything breaks, it was probably
already broken.
To generate a diff of this commit:
cvs rdiff -u -r1.98 -r1.99 src/sys/sys/types.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/sys/types.h
diff -u src/sys/sys/types.h:1.98 src/sys/sys/types.h:1.99
--- src/sys/sys/types.h:1.98 Sat Jan 14 01:02:08 2017
+++ src/sys/sys/types.h Sun Jul 8 06:21:41 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: types.h,v 1.98 2017/01/14 01:02:08 christos Exp $ */
+/* $NetBSD: types.h,v 1.99 2018/07/08 06:21:41 pgoyette Exp $ */
/*-
* Copyright (c) 1982, 1986, 1991, 1993, 1994
@@ -345,7 +345,7 @@ struct uio;
#ifdef _KERNEL
#define SET(t, f) ((t) |= (f))
#define ISSET(t, f) ((t) & (f))
-#define CLR(t, f) ((t) &= ~(f))
+#define CLR(t, f) ((t) = ~(~(t) | (f)))
#endif
#if !defined(_KERNEL) && !defined(_STANDALONE)