All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: speakup: main: switch multiple assignment for one assignment per line
@ 2020-03-15  4:40 Lourdes Pedrajas
  2020-03-15 16:24 ` Samuel Thibault
  0 siblings, 1 reply; 3+ messages in thread
From: Lourdes Pedrajas @ 2020-03-15  4:40 UTC (permalink / raw)
  To: outreachy-kernel, w.d.hubbs, chris, kirk, samuel.thibault, gregkh

One assignment per line is preferred, instead of multiple assignments.
To prevent possible undefined behavior.
Issue found with checkpath.

Signed-off-by: Lourdes Pedrajas <lu@pplo.net>
---
 drivers/staging/speakup/main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c
index 488f2539aa9a..d363009863e3 100644
--- a/drivers/staging/speakup/main.c
+++ b/drivers/staging/speakup/main.c
@@ -2117,7 +2117,8 @@ speakup_key(struct vc_data *vc, int shift_state, int keycode, u_short keysym,
 			spk_keydown = 0;
 			goto out;
 		}
-		value = spk_lastkey = pad_chars[value];
+		spk_lastkey = pad_chars[value];
+		value = pad_chars[value];
 		spk_keydown++;
 		spk_parked &= 0xfe;
 		goto no_map;
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-03-15 21:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-15  4:40 [PATCH] staging: speakup: main: switch multiple assignment for one assignment per line Lourdes Pedrajas
2020-03-15 16:24 ` Samuel Thibault
2020-03-15 21:44   ` Lourdes Pedrajas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.