| 1116 | } |
| 1117 | |
| 1118 | char* CStat::sRepartitionInfo(T_dynamicalRepartition * tabRepartition, |
| 1119 | int sizeOfTab) |
| 1120 | { |
| 1121 | static char *repartitionInfo; |
| 1122 | char buffer[MAX_CHAR_BUFFER_SIZE]; |
| 1123 | int dlen = strlen(stat_delimiter); |
| 1124 | |
| 1125 | if(tabRepartition != nullptr) { |
| 1126 | // if a repartition is present, this field match the repartition name |
| 1127 | repartitionInfo = (char *)realloc(repartitionInfo, dlen + 1); |
| 1128 | sprintf(repartitionInfo, "%s", stat_delimiter); |
| 1129 | for(int i=0; i<(sizeOfTab-1); i++) { |
| 1130 | sprintf(buffer, "%lu%s", tabRepartition[i].nbInThisBorder, stat_delimiter); |
| 1131 | repartitionInfo = (char *)realloc(repartitionInfo, strlen(repartitionInfo) + strlen(buffer) + 1); |
| 1132 | strcat(repartitionInfo, buffer); |
| 1133 | } |
| 1134 | sprintf(buffer, "%lu%s", tabRepartition[sizeOfTab-1].nbInThisBorder, stat_delimiter); |
| 1135 | repartitionInfo = (char *)realloc(repartitionInfo, strlen(repartitionInfo) + strlen(buffer) + 1); |
| 1136 | strcat(repartitionInfo, buffer); |
| 1137 | } else { |
| 1138 | repartitionInfo = (char *)realloc(repartitionInfo, 2); |
| 1139 | repartitionInfo[0] = '\0'; |
| 1140 | } |
| 1141 | |
| 1142 | return(repartitionInfo); |
| 1143 | } |
| 1144 | |
| 1145 | void CStat::dumpData () |
| 1146 | { |
nothing calls this directly
no outgoing calls
no test coverage detected