Skip to contentSkip to conversation

kexec_tools_klibc_2.0.2: update x86_vfscanf.patch

PATCH New Andrea Adami 1 participant 1 message Aug 4, 2014

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 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...

---
 .../recipes-kernel/kexec/kexec-tools-klibc-2.0.2/x86_vfscanf.patch      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc-2.0.2/x86_vfscanf.patch +1 -1
index 14f4d2a..cad6951 100644
@@ -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);
 +	}
Signature · 1 line
1.9.1