Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/riastradh-drm2]: src/sys/external/bsd/drm2/include/linux Avoid INT_MAX i...
details: https://anonhg.NetBSD.org/src/rev/d95d07fac9ea
branches: riastradh-drm2
changeset: 788134:d95d07fac9ea
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Jul 24 02:23:48 2013 +0000
description:
Avoid INT_MAX in PTR_ERR; check for truncation instead.
diffstat:
sys/external/bsd/drm2/include/linux/err.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (18 lines):
diff -r 87f02c673240 -r d95d07fac9ea sys/external/bsd/drm2/include/linux/err.h
--- a/sys/external/bsd/drm2/include/linux/err.h Wed Jul 24 02:23:34 2013 +0000
+++ b/sys/external/bsd/drm2/include/linux/err.h Wed Jul 24 02:23:48 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: err.h,v 1.1.2.1 2013/07/24 02:07:31 riastradh Exp $ */
+/* $NetBSD: err.h,v 1.1.2.2 2013/07/24 02:23:48 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -56,7 +56,7 @@
static inline int
PTR_ERR(const void *ptr)
{
- KASSERT((intptr_t)INT_MAX <= (intptr_t)ptr);
+ KASSERT(ptr == (void *)(intptr_t)(int)(intptr_t)ptr); /* XXX Hurk! */
return (int)(intptr_t)ptr;
}
Home |
Main Index |
Thread Index |
Old Index