# HG changeset patch # User Florian Pose # Date 1204206062 0 # Node ID e0757d452fc984a912e49abf3dcda325f0133db3 # Parent 3cb5769059f43465328fc225bf0f00d94270de72 Renamed ec_pdo_mapping_find_pdo() to ec_pdo_mapping_find_pdo_const(). diff -r 3cb5769059f4 -r e0757d452fc9 master/pdo_mapping.c --- a/master/pdo_mapping.c Thu Feb 28 11:23:34 2008 +0000 +++ b/master/pdo_mapping.c Thu Feb 28 13:41:02 2008 +0000 @@ -318,14 +318,14 @@ /*****************************************************************************/ -/** Finds a Pdo with the given index. - */ -const ec_pdo_t *ec_pdo_mapping_find_pdo( +/** Finds a Pdo with the given index and returns a const pointer. + */ +const ec_pdo_t *ec_pdo_mapping_find_pdo_const( const ec_pdo_mapping_t *pm, /**< Pdo mapping. */ uint16_t index /**< Pdo index. */ ) { - ec_pdo_t *pdo; + const ec_pdo_t *pdo; list_for_each_entry(pdo, &pm->pdos, list) { if (pdo->index != index) diff -r 3cb5769059f4 -r e0757d452fc9 master/pdo_mapping.h --- a/master/pdo_mapping.h Thu Feb 28 11:23:34 2008 +0000 +++ b/master/pdo_mapping.h Thu Feb 28 13:41:02 2008 +0000 @@ -73,7 +73,8 @@ uint16_t ec_pdo_mapping_total_size(const ec_pdo_mapping_t *); int ec_pdo_mapping_equal(const ec_pdo_mapping_t *, const ec_pdo_mapping_t *); -const ec_pdo_t *ec_pdo_mapping_find_pdo(const ec_pdo_mapping_t *, uint16_t); +const ec_pdo_t *ec_pdo_mapping_find_pdo_const(const ec_pdo_mapping_t *, + uint16_t); /*****************************************************************************/ diff -r 3cb5769059f4 -r e0757d452fc9 master/slave.c --- a/master/slave.c Thu Feb 28 11:23:34 2008 +0000 +++ b/master/slave.c Thu Feb 28 13:41:02 2008 +0000 @@ -1253,7 +1253,7 @@ for (i = 0; i < slave->sii.sync_count; i++) { sync = &slave->sii.syncs[i]; - if (!(pdo = ec_pdo_mapping_find_pdo(&sync->mapping, index))) + if (!(pdo = ec_pdo_mapping_find_pdo_const(&sync->mapping, index))) continue; return pdo;