linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] candump: resolve signedness warnings
@ 2012-04-19  7:44 yegorslists
  2012-04-19  8:54 ` Marc Kleine-Budde
  0 siblings, 1 reply; 6+ messages in thread
From: yegorslists @ 2012-04-19  7:44 UTC (permalink / raw)
  To: linux-can; +Cc: Yegor Yefremov

From: Yegor Yefremov <yegorslists@googlemail.com>

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
---
 candump.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/candump.c b/candump.c
index 5ba9431..ac51192 100644
--- a/candump.c
+++ b/candump.c
@@ -611,7 +611,7 @@ int main(int argc, char **argv)
 					return 1;
 				}
 
-				if (nbytes < sizeof(struct can_frame)) {
+				if ((size_t)nbytes < sizeof(struct can_frame)) {
 					fprintf(stderr, "read: incomplete CAN frame\n");
 					return 1;
 				}
@@ -627,7 +627,7 @@ int main(int argc, char **argv)
 					if (nbytes < 0) {
 						perror("bridge write");
 						return 1;
-					} else if (nbytes < sizeof(struct can_frame)) {
+					} else if ((size_t)nbytes < sizeof(struct can_frame)) {
 						fprintf(stderr,"bridge write: incomplete CAN frame\n");
 						return 1;
 					}
-- 
1.7.7


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-04-19 16:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-19  7:44 [PATCH] candump: resolve signedness warnings yegorslists
2012-04-19  8:54 ` Marc Kleine-Budde
2012-04-19 15:46   ` Oliver Hartkopp
2012-04-19 15:57     ` Marc Kleine-Budde
2012-04-19 16:01       ` Wolfram Sang
2012-04-19 16:03         ` Marc Kleine-Budde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).