Skip to contentSkip to conversation

staging: speakup: add braces around else statement

PATCH In review Santha Meena Ramamoorthy 2 participants 2 messages Feb 24, 2018 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: speakup: add braces around else statement

Add braces {} around else statement to conform to the Linux kernel coding style. Issue found using checkpatch.

---
 drivers/staging/speakup/main.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/staging/speakup/main.c +4 -2
index cf12590..d7cdec3 100644
@@ -449,8 +449,9 @@ static void speak_char(u16 ch)
 		if (*cp == '^') {
 			cp++;
 			synth_printf(" %s%s ", spk_msg_get(MSG_CTRL), cp);
-		} else
+		} else {
 			synth_printf(" %s ", cp);
+		}
 	}
 }
 
@@ -561,7 +562,7 @@ static u_long get_word(struct vc_data *vc)
 		   get_char(vc, (u_short *)&tmp_pos + 1, &temp) > SPACE) {
 		tmp_pos += 2;
 		tmpx++;
-	} else
+	} else {
 		while (tmpx > 0) {
 			ch = get_char(vc, (u_short *)tmp_pos - 1, &temp);
 			if ((ch == SPACE || ch == 0 ||
@@ -571,6 +572,7 @@ static u_long get_word(struct vc_data *vc)
 			tmp_pos -= 2;
 			tmpx--;
 		}
+	}
 	attr_ch = get_char(vc, (u_short *)tmp_pos, &spk_attr);
 	buf[cnt++] = attr_ch;
 	while (tmpx < vc->vc_cols - 1) {
Signature · 1 line
2.7.4
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Santha Meena Ramamoorthy, on sam. 24 févr. 2018 15:25:49 -0800, wrote:

Add braces {} around else statement to conform to the Linux kernel coding style. Issue found using checkpatch.

Quoted 39 lines
---
 drivers/staging/speakup/main.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/staging/speakup/main.c +4 -2
index cf12590..d7cdec3 100644
@@ -449,8 +449,9 @@ static void speak_char(u16 ch)
 		if (*cp == '^') {
 			cp++;
 			synth_printf(" %s%s ", spk_msg_get(MSG_CTRL), cp);
-		} else
+		} else {
 			synth_printf(" %s ", cp);
+		}
 	}
 }
 
@@ -561,7 +562,7 @@ static u_long get_word(struct vc_data *vc)
 		   get_char(vc, (u_short *)&tmp_pos + 1, &temp) > SPACE) {
 		tmp_pos += 2;
 		tmpx++;
-	} else
+	} else {
 		while (tmpx > 0) {
 			ch = get_char(vc, (u_short *)tmp_pos - 1, &temp);
 			if ((ch == SPACE || ch == 0 ||
@@ -571,6 +572,7 @@ static u_long get_word(struct vc_data *vc)
 			tmp_pos -= 2;
 			tmpx--;
 		}
+	}
 	attr_ch = get_char(vc, (u_short *)tmp_pos, &spk_attr);
 	buf[cnt++] = attr_ch;
 	while (tmpx < vc->vc_cols - 1) {
Signature · 1 line
2.7.4
Signature · 2 lines
Samuel
<L> pour moi le seul qui est autorisé à fasciser, c moi :-)