- avoid sprintf to itself
authorAleš Křenek <ljocha@ics.muni.cz>
Wed, 1 Aug 2007 16:54:48 +0000 (16:54 +0000)
committerAleš Křenek <ljocha@ics.muni.cz>
Wed, 1 Aug 2007 16:54:48 +0000 (16:54 +0000)
- ' ' as an integer separator rather than '' (have it ever worked?)

org.glite.lb.server/src/jobstat.h
org.glite.lb.server/src/jobstat_supp.c

index 850a27c..761403c 100644 (file)
@@ -11,7 +11,7 @@
  * (includes edg_wll_JobStat API structure)
  */
 
-#define INTSTAT_VERSION "release-3.3.2_pbs_condor"
+#define INTSTAT_VERSION "release-3.3.3"
 
 
 // Internal error codes 
index 89c728e..68d57b6 100644 (file)
@@ -90,7 +90,7 @@ static char *enc_int_array(char *old, int *item, int itemsNo)
 
        strpom=(char*)calloc(strlen(old)+1,sizeof(char));
 
-       for (index=0; index <= itemsNo; index++) sprintf(strpom,"%s%d%s", strpom, item[index],index==itemsNo?"":";");
+       for (index=0; index <= itemsNo; index++) sprintf(strpom+strlen(strpom),"%d%s", item[index],index==itemsNo?" ":";");
 
         asprintf(&out,"%s%s ", old, strpom);
        free(strpom);