tty/vt: consolemap: make p1 increment less confusing in con_get_unimap()
authorJiri Slaby <jslaby@suse.cz>
Tue, 7 Jun 2022 10:49:25 +0000 (12:49 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Jun 2022 11:37:02 +0000 (13:37 +0200)
p2 is already incremented like this few lines below, so do the same for
p1. This makes the code easier to follow.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20220607104946.18710-15-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/vt/consolemap.c

index 84c8043a36d0bf18b25e5aa6bc1115f3fe41b667..831450f2bfd1dd2e7fbfb509959c7b6d59cf3a98 100644 (file)
@@ -793,8 +793,8 @@ int con_get_unimap(struct vc_data *vc, ushort ct, ushort __user *uct,
                if (!p1)
                        continue;
 
-               for (j = 0; j < UNI_DIR_ROWS; j++) {
-                       p2 = *(p1++);
+               for (j = 0; j < UNI_DIR_ROWS; j++, p1++) {
+                       p2 = *p1;
                        if (!p2)
                                continue;