[PATCH xkbcomp 1/2] Removing unnecessary and unsafe code in scanchar()

Julien Cristau jcristau at debian.org
Sun Jan 16 03:30:35 PST 2011


On Sun, Jan 16, 2011 at 01:26:09 +0500, Alexandr Shadchin wrote:

> If readBufLen == BUFSIZE and feof() != 0, then go outside the boundaries
> of buffer.
> 
> Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin at gmail.com>
> ---
>  xkbscan.c |    2 --
>  1 files changed, 0 insertions(+), 2 deletions(-)
> 
I think we should revert 9887842e33174a6e98675b912e419c711dd20c0f
instead.  And maybe use getc_unlocked instead of getc to get rid of some
overhead.  But open-coding getc and ungetc, while it makes ltrace go
faster, doesn't seem all that great.

Cheers,
Julien


More information about the xorg-devel mailing list