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/dist/drm/nouveau/core/engine/perfmon D...
details: https://anonhg.NetBSD.org/src/rev/1345dad89b70
branches: trunk
changeset: 343466:1345dad89b70
user: riastradh <riastradh%NetBSD.org@localhost>
date: Fri Feb 05 23:45:44 2016 +0000
description:
Don't ask `size < 0' when size is unsigned.
diffstat:
sys/external/bsd/drm2/dist/drm/nouveau/core/engine/perfmon/nouveau_engine_perfmon_base.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (31 lines):
diff -r bc6ff734d153 -r 1345dad89b70 sys/external/bsd/drm2/dist/drm/nouveau/core/engine/perfmon/nouveau_engine_perfmon_base.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/perfmon/nouveau_engine_perfmon_base.c Fri Feb 05 20:39:50 2016 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/perfmon/nouveau_engine_perfmon_base.c Fri Feb 05 23:45:44 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nouveau_engine_perfmon_base.c,v 1.2 2014/08/23 08:03:34 riastradh Exp $ */
+/* $NetBSD: nouveau_engine_perfmon_base.c,v 1.3 2016/02/05 23:45:44 riastradh Exp $ */
/*
* Copyright 2013 Red Hat Inc.
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_engine_perfmon_base.c,v 1.2 2014/08/23 08:03:34 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_engine_perfmon_base.c,v 1.3 2016/02/05 23:45:44 riastradh Exp $");
#include <core/option.h>
#include <core/class.h>
@@ -171,8 +171,12 @@
struct nouveau_perfdom *dom;
struct nv_perfctr_sample *args = data;
+#if 1
+ CTASSERT(sizeof(*args) == 0);
+#else
if (size < sizeof(*args))
return -EINVAL;
+#endif
ppm->sequence++;
list_for_each_entry(dom, &ppm->domains, head) {
Home |
Main Index |
Thread Index |
Old Index