Re: [PATCH] char/tty_io: fix legacy pty name when more than 256 ptydevices are requested

From: H. Peter Anvin
Date: Thu Sep 10 2009 - 02:25:45 EST


On 09/09/2009 09:05 PM, Mauro Carvalho Chehab wrote:
> {
> + static char ptychar[] = "pqrstuvwxyzabcde";
> +

Oh yes, this should be "static const char ...".

> + * The second nibble encoded with ptychar;
> + * The first nibble, printed in hexadecimal;
> + * The other nibbles, printed in hexadecimal.

The last two are in the wrong order (and you reversed the order of the
code from my example, which made that harder to see.)

-hpa

--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/