Inner 'p->stresslevel>=4' will always be true. Thus checking for count_stressed is redundant.master
p = &phoneme_list[0]; | p = &phoneme_list[0]; | ||||
for (ix = 0; ix < n_phoneme_list; ix++, p++) { | for (ix = 0; ix < n_phoneme_list; ix++, p++) { | ||||
if ((p->type == phVOWEL) && (p->stresslevel >= 4)) { | if ((p->type == phVOWEL) && (p->stresslevel >= 4)) { | ||||
if (count_stressed == 0) | |||||
final_stressed = ix; | |||||
if (p->stresslevel >= 4) { | |||||
final_stressed = ix; | |||||
count_stressed++; | |||||
} | |||||
final_stressed = ix; | |||||
count_stressed++; | |||||
} | } | ||||
} | } | ||||