avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-libc-dev] [bugs #10420] sscanf(), If there is a decimal number


From: Theodore A. Roth
Subject: Re: [avr-libc-dev] [bugs #10420] sscanf(), If there is a decimal number followed by the character '_' in the buffer, you can't get the the number.
Date: Sun, 19 Sep 2004 08:58:57 -0700 (PDT)

On Sun, 19 Sep 2004, Joerg Wunsch wrote:

> As Joerg Wunsch wrote:
>
> > I think I see the logical flaw in this now, too.  I tried to minimize
> > the code required for this check, but obviously opened a window for
> > false positives by that.
>
> I tried to really understand what was going on, and debugged it a bit
> further.  I can now clearly see the problem, and have another
> suggested fix (appended).  Not only the code is documented better now,
> but I'm also saving a few bytes compared to Ted's version.
>
> My version:
>
> % avr-size {.,avr3/,avr4/,avr5/}/build/libc/stdio/vfscanf_std.o
>    text    data     bss     dec     hex filename
>    1370       0       0    1370     55a ./build/libc/stdio/vfscanf_std.o
>    1502       0       0    1502     5de avr3//build/libc/stdio/vfscanf_std.o
>    1256       0       0    1256     4e8 avr4//build/libc/stdio/vfscanf_std.o
>    1390       0       0    1390     56e avr5//build/libc/stdio/vfscanf_std.o
>
> Ted's version:
>
> % avr-size {.,avr3/,avr4/,avr5/}/build/libc/stdio/vfscanf_std.o
>    text    data     bss     dec     hex filename
>    1378       0       0    1378     562 ./build/libc/stdio/vfscanf_std.o
>    1514       0       0    1514     5ea avr3//build/libc/stdio/vfscanf_std.o
>    1260       0       0    1260     4ec avr4//build/libc/stdio/vfscanf_std.o
>    1396       0       0    1396     574 avr5//build/libc/stdio/vfscanf_std.o
>
> In comparision, the wrong avr2 version (before the patch) was 1366
> bytes long.
>
> If nobody sees a problem with that patch, I'd like to commit it.

Looks good. Go ahead and commit it.


---
Ted Roth
PGP Key ID: 0x18F846E9
Jabber ID: address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]