mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-20 19:23:57 +08:00
staging: speakup: use swap() in get_highlight_color()
Use kernel.h macro definition. Thanks to Julia Lawall for Coccinelle scripting support. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
2ccd94e412
commit
590aeb174a
@ -1597,7 +1597,7 @@ static int count_highlight_color(struct vc_data *vc)
|
||||
static int get_highlight_color(struct vc_data *vc)
|
||||
{
|
||||
int i, j;
|
||||
unsigned int cptr[8], tmp;
|
||||
unsigned int cptr[8];
|
||||
int vc_num = vc->vc_num;
|
||||
|
||||
for (i = 0; i < 8; i++)
|
||||
@ -1606,11 +1606,8 @@ static int get_highlight_color(struct vc_data *vc)
|
||||
for (i = 0; i < 7; i++)
|
||||
for (j = i + 1; j < 8; j++)
|
||||
if (speakup_console[vc_num]->ht.bgcount[cptr[i]] >
|
||||
speakup_console[vc_num]->ht.bgcount[cptr[j]]) {
|
||||
tmp = cptr[i];
|
||||
cptr[i] = cptr[j];
|
||||
cptr[j] = tmp;
|
||||
}
|
||||
speakup_console[vc_num]->ht.bgcount[cptr[j]])
|
||||
swap(cptr[i], cptr[j]);
|
||||
|
||||
for (i = 0; i < 8; i++)
|
||||
if (speakup_console[vc_num]->ht.bgcount[cptr[i]] != 0)
|
||||
|
Loading…
Reference in New Issue
Block a user