Skip to content

Commit 342cc8f

Browse files
author
Timmy
committed
use snprintf instead of itoa to support linux system
1 parent d8ca587 commit 342cc8f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/library/blas/gens/syrxk.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,7 +1224,7 @@ genUpdateGenericDiagTile(
12241224
unsigned int maxFetches = 0;
12251225
const char *yname, *xname;
12261226
const char *ldcName;
1227-
char hexadec[1];
1227+
char hexadec[2];
12281228

12291229
batch = createStmtBatch();
12301230
if (batch == NULL) {
@@ -1453,7 +1453,8 @@ genUpdateGenericDiagTile(
14531453
ksprintf(&kstr, "cc%u", i);
14541454
}
14551455
else {
1456-
itoa(iter.col, hexadec, 16);
1456+
snprintf(hexadec, sizeof(char)*2, "%x", iter.col);
1457+
//itoa(iter.col, hexadec, 16);
14571458
ksprintf(&kstr, "cc%u.s%s", i, hexadec);
14581459
}
14591460

0 commit comments

Comments
 (0)