diff options
author | Andy Spencer <andy753421@gmail.com> | 2009-10-02 02:44:27 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-10-02 03:11:16 +0400 |
commit | 8fccae2c95506270f74ee8429c273b0924e89c83 (patch) | |
tree | 0d7147c02cda1ae3476698808957477569160c00 /fs/afs/internal.h | |
parent | d41a4b515e346b3afdb5147d86927fa5835fc13b (diff) | |
download | linux-8fccae2c95506270f74ee8429c273b0924e89c83.tar.xz |
sscanf(): fix %*s%n
When using %*s, sscanf should honor conversion specifiers immediately
following the %*s. For example, the following code should find the
position of the end of the string "hello".
int end;
char buf[] = "hello world";
sscanf(buf, "%*s%n", &end);
printf("%d\n", end);
Ideally, sscanf would advance the fmt and str pointers the same as it
would without the *, but the code for that is rather complicated and is
not included in the patch.
Signed-off-by: Andy Spencer <andy753421@gmail.com>
Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/afs/internal.h')
0 files changed, 0 insertions, 0 deletions