~ubuntu-branches/ubuntu/utopic/libmodbus/utopic

« back to all changes in this revision

Viewing changes to .pc/01-add-length-checks.patch/src/modbus.c

  • Committer: Package Import Robot
  • Author(s): Ivo De Decker
  • Date: 2013-06-30 12:25:01 UTC
  • mfrom: (1.1.3)
  • Revision ID: package-import@ubuntu.com-20130630122501-13vkglrt4xzalz1p
Tags: 3.0.4-1
* New upstream release 
* Update standards-version to 3.9.4 (no changes) 
* Enable parallel build
* Enable verbose build to show compiler flags to build log checks 
* Update watch file to filter out unstable versions 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1403
1403
int modbus_set_error_recovery(modbus_t *ctx,
1404
1404
                              modbus_error_recovery_mode error_recovery)
1405
1405
{
1406
 
    if (error_recovery >= 0) {
1407
 
        ctx->error_recovery = (uint8_t) error_recovery;
1408
 
    } else {
1409
 
        errno = EINVAL;
1410
 
        return -1;
1411
 
    }
1412
 
 
 
1406
    /* The type of modbus_error_recovery_mode is unsigned enum */
 
1407
    ctx->error_recovery = (uint8_t) error_recovery;
1413
1408
    return 0;
1414
1409
}
1415
1410