Changeset a9546aa in rtems


Ignore:
Timestamp:
Sep 24, 2008, 2:31:37 PM (11 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.9
Children:
8c8146e3
Parents:
8f608626
Message:

2008-09-24 Joel Sherrill <joel.sherrill@…>

PR 1326/cpukit

  • libi2c/libi2c.c: Use int for return value when negative values possible.
Location:
cpukit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r8f608626 ra9546aa  
     12008-09-24      Joel Sherrill <joel.sherrill@OARcorp.com>
     2
     3        PR 1326/cpukit
     4        * libi2c/libi2c.c: Use int for return value when negative values
     5        possible.
     6
    172008-09-24      Ralf Corsépius <ralf.corsepius@rtems.org>
    28
  • cpukit/libi2c/libi2c.c

    r8f608626 ra9546aa  
    543543  DECL_CHECKED_BH (busno, bush, minor, -)
    544544
    545     if (not_started (busno))
     545  if (not_started (busno))
    546546    return -RTEMS_NOT_OWNER_OF_RESOURCE;
    547547
     
    560560  DECL_CHECKED_BH (busno, bush, minor, -)
    561561
    562     if (not_started (busno))
     562  if (not_started (busno))
    563563    return -RTEMS_NOT_OWNER_OF_RESOURCE;
    564564
     
    644644         int rw)
    645645{
    646   rtems_status_code sc;
     646  rtems_status_code   sc;
    647647  rtems_libi2c_bus_t *bush;
     648  int                 status;
    648649
    649650  if ((sc = rtems_libi2c_send_start (minor)))
     
    659660
    660661  if (rw)
    661     sc = bush->ops->read_bytes (bush, bytes, nbytes);
     662    status = bush->ops->read_bytes (bush, bytes, nbytes);
    662663  else
    663     sc = bush->ops->write_bytes (bush, bytes, nbytes);
    664 
    665   if (sc < 0) {
     664    status = bush->ops->write_bytes (bush, bytes, nbytes);
     665
     666  if (status < 0) {
    666667    rtems_libi2c_send_stop (minor);
    667668  }
    668   return sc;
     669  return status;
    669670}
    670671
Note: See TracChangeset for help on using the changeset viewer.