[oe-commits] Andrea Adami : kexec_tools_klibc_2.0.2: update x86_vfscanf.patch

git at git.openembedded.org git at git.openembedded.org
Sat Aug 9 16:13:22 UTC 2014


Module: meta-openembedded.git
Branch: master-next
Commit: df7ef5be2f54a957e41066d788f527959331ed48
URL:    http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=df7ef5be2f54a957e41066d788f527959331ed48

Author: Andrea Adami <andrea.adami at gmail.com>
Date:   Mon Aug  4 23:53:30 2014 +0200

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 at gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>

---

 .../recipes-kernel/kexec/kexec-tools-klibc-2.0.2/x86_vfscanf.patch      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc-2.0.2/x86_vfscanf.patch b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc-2.0.2/x86_vfscanf.patch
index 14f4d2a..cad6951 100644
--- a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc-2.0.2/x86_vfscanf.patch
+++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc-2.0.2/x86_vfscanf.patch
@@ -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);
 +	}



More information about the Openembedded-commits mailing list