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/subdev/therm Mor...
details: https://anonhg.NetBSD.org/src/rev/fee73b6f539c
branches: trunk
changeset: 343468:fee73b6f539c
user: riastradh <riastradh%NetBSD.org@localhost>
date: Fri Feb 05 23:49:26 2016 +0000
description:
More useful array bounds check for enum values.
diffstat:
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/therm/nouveau_subdev_therm_temp.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r a31d1e560da7 -r fee73b6f539c sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/therm/nouveau_subdev_therm_temp.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/therm/nouveau_subdev_therm_temp.c Fri Feb 05 23:46:40 2016 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/therm/nouveau_subdev_therm_temp.c Fri Feb 05 23:49:26 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nouveau_subdev_therm_temp.c,v 1.1.1.1 2014/08/06 12:36:32 riastradh Exp $ */
+/* $NetBSD: nouveau_subdev_therm_temp.c,v 1.2 2016/02/05 23:49:26 riastradh Exp $ */
/*
* Copyright 2012 The Nouveau community
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_subdev_therm_temp.c,v 1.1.1.1 2014/08/06 12:36:32 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_subdev_therm_temp.c,v 1.2 2016/02/05 23:49:26 riastradh Exp $");
#include "priv.h"
@@ -104,7 +104,7 @@
};
int temperature = therm->temp_get(therm);
- if (thrs < 0 || thrs > 3)
+ if ((unsigned)thrs >= __arraycount(thresolds))
return;
if (dir == NOUVEAU_THERM_THRS_FALLING)
Home |
Main Index |
Thread Index |
Old Index