modifiers: Fix PVS 743

Fix  'gotone' is assigned values twice successively.

Change-Id: Ibe9f531ba4d16cec61b49cc49e842486b5ab6f64
Reviewed-on: https://review.haiku-os.org/700
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
This commit is contained in:
Murai Takashi 2018-11-14 06:19:35 +09:00 committed by waddlesplash
parent f5a452910a
commit 81728c84c5

View File

@ -54,11 +54,10 @@ list_modifiers(int mods)
{ {
int i; int i;
int gotone = 0; int gotone = 0;
for (i=0; modifier_names[i]; i++) { for (i = 0; modifier_names[i]; i++) {
if (mods & modifier_bits[i]) { if (mods & modifier_bits[i]) {
if (gotone) if (gotone)
printf(","); printf(",");
gotone = 0;
printf("%s", modifier_names[i]); printf("%s", modifier_names[i]);
gotone = 1; gotone = 1;
} }