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

Change-Id: I7e4f04d10b2f9cc9dbed2431e53b5ebc540acf56


[ROCm/rocminfo commit: 6f140e5391]
Este cometimento está contido em:
Wilfried Holzke criou e Chris Freehill cometeu 2019-08-21 16:12:55 -05:00
1 ascendente 2fe33cf4e3
cometimento ead25aa1a5
1 ficheiro modificado
+1 -1
+1 -1
Ver ficheiro
@@ -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", \