[merged] ihex-fix-unused-return-value-compiler-warning.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     ihex: fix unused return value compiler warning
has been removed from the -mm tree.  Its filename was
     ihex-fix-unused-return-value-compiler-warning.patch

This patch was dropped because it was merged into mainline or a subsystem tree

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: ihex: fix unused return value compiler warning
From: Chris Ruffin <cmruffin@xxxxxxxxx>

Fix unusued return value compiler warnings due to unchecked write() calls.

[akpm@xxxxxxxxxxxxxxxxxxxx: correctly handle short writes]
Signed-off-by: Chris Ruffin <cmruffin@xxxxxxxxx>
Cc: Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 firmware/ihex2fw.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff -puN firmware/ihex2fw.c~ihex-fix-unused-return-value-compiler-warning firmware/ihex2fw.c
--- a/firmware/ihex2fw.c~ihex-fix-unused-return-value-compiler-warning
+++ a/firmware/ihex2fw.c
@@ -124,8 +124,7 @@ int main(int argc, char **argv)
 	if (process_ihex(data, st.st_size))
 		return 1;
 
-	output_records(outfd);
-	return 0;
+	return output_records(outfd);
 }
 
 static int process_ihex(uint8_t *data, ssize_t size)
@@ -269,11 +268,13 @@ static int output_records(int outfd)
 
 		p->addr = htonl(p->addr);
 		p->len = htons(p->len);
-		write(outfd, &p->addr, writelen);
+		if (write(outfd, &p->addr, writelen) != writelen)
+			return 1;
 		p = p->next;
 	}
 	/* EOF record is zero length, since we don't bother to represent
 	   the type field in the binary version */
-	write(outfd, zeroes, 6);
+	if (write(outfd, zeroes, 6) != 6)
+		return 1;
 	return 0;
 }
_

Patches currently in -mm which might be from cmruffin@xxxxxxxxx are

origin.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux