[oe] [meta-initramfs][PATCH] kexec_tools_klibc_2.0.2: update x86_vfscanf.patch

2014-07-31 Thread Andrea Adami
fgets in while loops is expected to check for != NULL

Signed-off-by: Andrea Adami 
---
 .../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);
 +  }
-- 
1.9.1

-- 
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel


Re: [oe] [meta-initramfs][PATCH] kexec_tools_klibc_2.0.2: update x86_vfscanf.patch

2014-07-31 Thread Khem Raj
On Thu, Jul 31, 2014 at 3:58 PM, Andrea Adami  wrote:
> fgets in while loops is expected to check for != NULL

I think the message could be slightly changes, saying that fgets
returns NULL on error thats why we check for NULL and not 0
-- 
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel