Explorar o código

avoid using strcpy

Samuel Thibault %!s(int64=8) %!d(string=hai) anos
pai
achega
a47ff9032d
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/core/perfmodel/perfmodel_history.c

+ 1 - 1
src/core/perfmodel/perfmodel_history.c

@@ -1405,7 +1405,7 @@ void starpu_perfmodel_get_arch_name(struct starpu_perfmodel_arch* arch, char *ar
 	STARPU_ASSERT(comb != -1);
 	char devices[STR_VERY_LONG_LENGTH];
 	int written = 0;
-	strcpy(devices, "");
+	devices[0] = '\0';
 	for(i=0 ; i<arch->ndevices ; i++)
 	{
 		written += snprintf(devices + written, sizeof(devices)-written, "%s%d%s", starpu_perfmodel_get_archtype_name(arch->devices[i].type), arch->devices[i].devid, i != arch->ndevices-1 ? "_":"");