mirror of
https://github.com/torvalds/linux.git
synced 2024-12-01 00:21:32 +00:00
tty/vt: consolemap: use | for binary addition
Unicode letters are composed as a bit shifts and sums of three values. Use "|" and not "+" for these bit operations. The former is indeed more appropriate. 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-9-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
e16cb6fe31
commit
ad8a2142ba
@ -265,7 +265,7 @@ static void set_inverse_trans_unicode(struct vc_data *conp,
|
||||
glyph = p2[k];
|
||||
if (glyph >= 0 && glyph < MAX_GLYPH
|
||||
&& q[glyph] < 32)
|
||||
q[glyph] = (i << 11) + (j << 6) + k;
|
||||
q[glyph] = (i << 11) | (j << 6) | k;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -788,7 +788,7 @@ int con_get_unimap(struct vc_data *vc, ushort ct, ushort __user *uct, struct uni
|
||||
continue;
|
||||
if (ect < ct) {
|
||||
unilist[ect].unicode =
|
||||
(i<<11)+(j<<6)+k;
|
||||
(i<<11) | (j<<6) | k;
|
||||
unilist[ect].fontpos = *p2;
|
||||
}
|
||||
ect++;
|
||||
|
Loading…
Reference in New Issue
Block a user