[PATCH 11/12] b1553brm.c: Fix Unsigned compared against 0 (CID #1399773)

Ryan Long thisisryanlong at gmail.com
Thu Mar 4 19:50:24 UTC 2021


CID 1399773: Unsigned compared against 0 in brm_write().

Closes #4295
---
 bsps/shared/grlib/1553/b1553brm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bsps/shared/grlib/1553/b1553brm.c b/bsps/shared/grlib/1553/b1553brm.c
index 694f585..484ee6d 100644
--- a/bsps/shared/grlib/1553/b1553brm.c
+++ b/bsps/shared/grlib/1553/b1553brm.c
@@ -982,7 +982,7 @@ static rtems_device_driver brm_write(rtems_device_major_number major, rtems_devi
 
 	rw_args->bytes_moved = count; 
 
-	if (count >= 0) {
+	if (count > 0) {
 		return RTEMS_SUCCESSFUL;
 	}
 	return RTEMS_UNSATISFIED;
-- 
1.8.3.1



More information about the devel mailing list