tty/vt: consolemap: use sizeof(*pointer) instead of sizeof(type)
authorJiri Slaby <jslaby@suse.cz>
Tue, 7 Jun 2022 10:49:22 +0000 (12:49 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Jun 2022 11:37:01 +0000 (13:37 +0200)
commitacf90b4d52e6965cbc3b115a68e0f063f703719c
treede333e559fef0052de1830169c5efae454e17e8f
parent32bd78fc4948471be2853ba8b5229e4e1327e13e
tty/vt: consolemap: use sizeof(*pointer) instead of sizeof(type)

It is preferred to use sizeof(*pointer) instead of sizeof(type). First,
the type of the variable can change and one needs not change the former
(unlike the latter). Second, the latter is error-prone due to (u16),
(u16 *), and (u16 **) mixture here.

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20220607104946.18710-12-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/vt/consolemap.c