Minor changes (consistent variable naming)
authorMartin Troxler <ch1010277@ch10pc446>
Fri, 14 Jan 2011 12:23:00 +0100
changeset 2039 629d3cf05180
parent 2038 770e86a39c98
child 2040 45706e3273fd
Minor changes (consistent variable naming)
master/master.c
--- a/master/master.c	Fri Jan 14 11:36:53 2011 +0100
+++ b/master/master.c	Fri Jan 14 12:23:00 2011 +0100
@@ -56,7 +56,7 @@
 
 /*****************************************************************************/
 
-/** Set to 1 to enable external datagram injection debugging.
+/** Set to 1 to enable fsm datagram injection debugging.
  */
 #ifdef USE_TRACE_PRINTK
 #define DEBUG_INJECT 1
@@ -670,7 +670,7 @@
         ec_master_t *master /**< EtherCAT master */
         )
 {
-    ec_datagram_t *datagram, *n;
+    ec_datagram_t *datagram, *next;
     size_t queue_size = 0;
 
     if (master->fsm_queue_lock_cb)
@@ -690,7 +690,7 @@
         queue_size += datagram->data_size;
     }
 
-    list_for_each_entry_safe(datagram, n, &master->fsm_datagram_queue,
+    list_for_each_entry_safe(datagram, next, &master->fsm_datagram_queue,
             fsm_queue) {
         queue_size += datagram->data_size;
         if (queue_size <= master->max_queue_size) {
@@ -1285,7 +1285,7 @@
         for (slave = master->slaves;
                 slave < master->slaves + master->slave_count;
                 slave++) {
-            ec_fsm_slave_exec(&slave->fsm); // may queue datagram in external queue
+            ec_fsm_slave_exec(&slave->fsm); // may queue datagram in fsm queue
         }
 #if defined(EC_EOE)
         if (!ec_master_eoe_processing(master))
@@ -1348,7 +1348,7 @@
         for (slave = master->slaves;
                 slave < master->slaves + master->slave_count;
                 slave++) {
-            ec_fsm_slave_exec(&slave->fsm); // may queue datagram in external queue
+            ec_fsm_slave_exec(&slave->fsm); // may queue datagram in fsm queue
         }
 #if defined(EC_EOE)
         ec_master_eoe_processing(master);
@@ -2039,13 +2039,13 @@
 
 void ecrt_master_send(ec_master_t *master)
 {
-    ec_datagram_t *datagram, *n;
+    ec_datagram_t *datagram, *next;
 
     ec_master_inject_fsm_datagrams(master);
 
     if (unlikely(!master->main_device.link_state)) {
         // link is down, no datagram can be sent
-        list_for_each_entry_safe(datagram, n, &master->datagram_queue, queue) {
+        list_for_each_entry_safe(datagram, next, &master->datagram_queue, queue) {
             datagram->state = EC_DATAGRAM_ERROR;
             list_del_init(&datagram->queue);
         }