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/dist/drm Avoid shadowing glob...
details: https://anonhg.NetBSD.org/src/rev/dd8855a4684f
branches: riastradh-drm2
changeset: 788261:dd8855a4684f
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Jul 24 02:58:09 2013 +0000
description:
Avoid shadowing global edid_vendor in drm_edid.c.
diffstat:
sys/external/bsd/drm2/dist/drm/drm_edid.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diffs (28 lines):
diff -r 088a3404158f -r dd8855a4684f sys/external/bsd/drm2/dist/drm/drm_edid.c
--- a/sys/external/bsd/drm2/dist/drm/drm_edid.c Wed Jul 24 02:57:54 2013 +0000
+++ b/sys/external/bsd/drm2/dist/drm/drm_edid.c Wed Jul 24 02:58:09 2013 +0000
@@ -453,6 +453,16 @@
*/
static bool edid_vendor(struct edid *edid, char *vendor)
{
+#ifdef __NetBSD__ /* XXX Avoid shadowing global definition. */
+ char edidv[3];
+
+ edidv[0] = ((edid->mfg_id[0] & 0x7c) >> 2) + '@';
+ edidv[1] = (((edid->mfg_id[0] & 0x3) << 3) |
+ ((edid->mfg_id[1] & 0xe0) >> 5)) + '@';
+ edidv[2] = (edid->mfg_id[1] & 0x1f) + '@';
+
+ return !strncmp(edidv, vendor, 3);
+#else
char edid_vendor[3];
edid_vendor[0] = ((edid->mfg_id[0] & 0x7c) >> 2) + '@';
@@ -461,6 +471,7 @@
edid_vendor[2] = (edid->mfg_id[1] & 0x1f) + '@';
return !strncmp(edid_vendor, vendor, 3);
+#endif
}
/**
Home |
Main Index |
Thread Index |
Old Index