Fixed sizeof(err_val) to return the number of characters in the array

Change-Id: I7e4f04d10b2f9cc9dbed2431e53b5ebc540acf56
This commit is contained in:
Wilfried Holzke
2019-08-16 22:04:52 +02:00
committed by Chris Freehill
orang tua 141592e4f3
melakukan 6f140e5391
+1 -1
Melihat File
@@ -72,7 +72,7 @@
char* err_str = NULL; \
if (hsa_status_string(err, \
(const char**)&err_str) != HSA_STATUS_SUCCESS) { \
snprintf(&(err_val[0]), sizeof(err_val[12]), "%#x", (uint32_t)err); \
snprintf(&(err_val[0]), sizeof(err_val), "%#x", (uint32_t)err); \
err_str = &(err_val[0]); \
} \
printf("%shsa api call failure at: %s:%d\n", \