[Beignet] [PATCH 1/2] Runtime: fix the incorrect device info string size.
zhigang.gong at linux.intel.com
zhigang.gong at linux.intel.com
Tue Nov 5 20:23:11 PST 2013
From: Zhigang Gong <zhigang.gong at intel.com>
sizeof(str) already includes the '\0', we don't need to add
1 to it.
Signed-off-by: Zhigang Gong <zhigang.gong at intel.com>
---
src/cl_gt_device.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cl_gt_device.h b/src/cl_gt_device.h
index 518234a..82818d1 100644
--- a/src/cl_gt_device.h
+++ b/src/cl_gt_device.h
@@ -67,7 +67,7 @@
#define DECL_INFO_STRING(FIELD, STRING) \
.FIELD = STRING, \
- .JOIN(FIELD,_sz) = sizeof(STRING) + 1,
+ .JOIN(FIELD,_sz) = sizeof(STRING),
DECL_INFO_STRING(name, "Intel HD Graphics Family")
DECL_INFO_STRING(vendor, "Intel")
DECL_INFO_STRING(version, LIBCL_VERSION_STRING)
--
1.7.9.5
More information about the Beignet
mailing list