From 81728c84c57ec49488724c32d0e8f6d0527f1362 Mon Sep 17 00:00:00 2001 From: Murai Takashi Date: Wed, 14 Nov 2018 06:19:35 +0900 Subject: [PATCH] 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 --- src/bin/modifiers.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/bin/modifiers.cpp b/src/bin/modifiers.cpp index a9bd96498c..b3fa77f05a 100644 --- a/src/bin/modifiers.cpp +++ b/src/bin/modifiers.cpp @@ -54,11 +54,10 @@ list_modifiers(int mods) { int i; int gotone = 0; - for (i=0; modifier_names[i]; i++) { + for (i = 0; modifier_names[i]; i++) { if (mods & modifier_bits[i]) { if (gotone) printf(","); - gotone = 0; printf("%s", modifier_names[i]); gotone = 1; }