char filename[PATH_MAX + 1];
for(n = 0; n < nb; n++) {
- first_of_group = 0;
+ first_of_group = (n == 0);
if(nodes[n]->group_id != current_group) {
if(file) { fclose(file); }
sprintf(filename, "%s%06d", result_file_prefix, nodes[n]->group_id);
write_groups_in_files(nb, nodes);
} else {
for(n = 0; n < nb; n++) {
- first_of_group = 0;
+ first_of_group = (n == 0);
if(n > 0 && nodes[n]->group_id != nodes[n-1]->group_id) {
if(!show_groups) {
printf("\n");