[rtems commit] mouse_parser.c: Fix warning by properly checking return code

Joel Sherrill joel at rtems.org
Sat Sep 21 21:19:51 UTC 2013


Module:    rtems
Branch:    master
Commit:    7071eb3ada7cd0e5f5f68f3ea2638e04e650fb6b
Changeset: http://git.rtems.org/rtems/commit/?id=7071eb3ada7cd0e5f5f68f3ea2638e04e650fb6b

Author:    Joel Sherrill <joel.sherrill at oarcorp.com>
Date:      Sat Sep 21 15:41:50 2013 -0500

mouse_parser.c: Fix warning by properly checking return code

---

 cpukit/libmisc/mouse/mouse_parser.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/cpukit/libmisc/mouse/mouse_parser.c b/cpukit/libmisc/mouse/mouse_parser.c
index 6ca871b..2831f64 100644
--- a/cpukit/libmisc/mouse/mouse_parser.c
+++ b/cpukit/libmisc/mouse/mouse_parser.c
@@ -299,7 +299,7 @@ void mouse_parser_enqueue( unsigned char *buffer, size_t size )
   BUTTON bptr;
 
   while( size-- ) {
-    if ( MOU_Data( *buffer++, &dx, &dy, &dz, &bptr ) ) {
+    if ( MOU_Data( *buffer++, &dx, &dy, &dz, &bptr ) == 1 ) {
        struct MW_UID_MESSAGE m;
 
         m.type = MV_UID_REL_POS;




More information about the vc mailing list