Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/include/drm Avoid needless #ifdef __i3...
details: https://anonhg.NetBSD.org/src/rev/394615583410
branches: trunk
changeset: 330992:394615583410
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sat Jul 26 14:27:40 2014 +0000
description:
Avoid needless #ifdef __i386__ with judicious use of MIN.
diffstat:
sys/external/bsd/drm2/include/drm/bus_dma_hacks.h | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diffs (23 lines):
diff -r 1c69798cf0fd -r 394615583410 sys/external/bsd/drm2/include/drm/bus_dma_hacks.h
--- a/sys/external/bsd/drm2/include/drm/bus_dma_hacks.h Sat Jul 26 14:26:04 2014 +0000
+++ b/sys/external/bsd/drm2/include/drm/bus_dma_hacks.h Sat Jul 26 14:27:40 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_dma_hacks.h,v 1.6 2014/07/22 22:14:22 riastradh Exp $ */
+/* $NetBSD: bus_dma_hacks.h,v 1.7 2014/07/26 14:27:40 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -131,12 +131,8 @@
nsegs = 0;
TAILQ_FOREACH(page, pglist, pageq.queue) {
- if (nsegs == INT_MAX)
+ if (nsegs == MIN(INT_MAX, (SIZE_MAX / sizeof(segs[0]))))
return ENOMEM;
-#if __i386__
- if (nsegs == (SIZE_MAX / sizeof(segs[0])))
- return ENOMEM;
-#endif
nsegs++;
}
Home |
Main Index |
Thread Index |
Old Index