aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386
diff options
context:
space:
mode:
authorKAMBAROV, ZAUR <kambarov@berkeley.edu>2005-06-28 23:45:06 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-29 00:20:33 -0400
commita8f5034540195307362d071a8b387226b410469f (patch)
tree6b11830d72e3d56178c705010583713df5842416 /arch/i386
parent4cceb4d13abaedbd52e54053367c793ed4aedb6b (diff)
[PATCH] coverity: i386: build.c: negative return to unsigned fix
Variable "c" was declared as an unsigned int, but used in: 125 for (i=0 ; (c=read(fd, buf, sizeof(buf)))>0 ; i+=c ) 126 if (write(1, buf, c) != c) 127 die("Write call failed"); (akpm: read() can return -1. If it does, we fill the disk up with garbage). Signed-off-by: Zaur Kambarov <zkambarov@coverity.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/i386')
-rw-r--r--arch/i386/boot/tools/build.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/i386/boot/tools/build.c b/arch/i386/boot/tools/build.c
index 4a17956512e1..6835f6d47c31 100644
--- a/arch/i386/boot/tools/build.c
+++ b/arch/i386/boot/tools/build.c
@@ -70,7 +70,8 @@ void usage(void)
70 70
71int main(int argc, char ** argv) 71int main(int argc, char ** argv)
72{ 72{
73 unsigned int i, c, sz, setup_sectors; 73 unsigned int i, sz, setup_sectors;
74 int c;
74 u32 sys_size; 75 u32 sys_size;
75 byte major_root, minor_root; 76 byte major_root, minor_root;
76 struct stat sb; 77 struct stat sb;