mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-01-01 13:58:06 +00:00
kexec_tools_klibc_2.0.2: update x86_vfscanf.patch
The POSIX standard http://pubs.opengroup.org/onlinepubs/009695399/functions/fgets.html states: If the stream is at end-of-file ... fgets() shall return a null pointer... If a read error occurs ... fgets() shall return a null pointer... Signed-off-by: Andrea Adami <andrea.adami@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
This commit is contained in:
parent
8f84267086
commit
d357cc7df0
|
|
@ -16,7 +16,7 @@
|
|||
- retno = vfscanf(fp, scanf_line, argptr);
|
||||
+
|
||||
+ line = xmalloc(sizeof(line) * line_size);
|
||||
+ while(fgets(line, sizeof(line), fp) != 0 ) {
|
||||
+ while(fgets(line, sizeof(line), fp) != NULL ) {
|
||||
+ line_size += MAX_LINE;
|
||||
+ line = xrealloc(line,line_size);
|
||||
+ }
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user