tool/CommandSlaves.cpp
changeset 1160 f02ff486b313
parent 1157 04d1c950cf9d
child 1220 15e8768b304f
--- a/tool/CommandSlaves.cpp	Mon Jul 28 12:11:50 2008 +0000
+++ b/tool/CommandSlaves.cpp	Mon Jul 28 12:15:25 2008 +0000
@@ -102,7 +102,8 @@
         const SlaveList &slaves
         )
 {
-    unsigned int numSlaves, i;
+    ec_ioctl_master_t master;
+    unsigned int i;
     ec_ioctl_slave_t slave;
     uint16_t lastAlias, aliasIndex;
     Info info;
@@ -113,11 +114,11 @@
     unsigned int maxPosWidth = 0, maxAliasWidth = 0,
                  maxRelPosWidth = 0, maxStateWidth = 0;
     
-    numSlaves = m.slaveCount();
+    m.getMaster(&master);
 
     lastAlias = 0;
     aliasIndex = 0;
-    for (i = 0; i < numSlaves; i++) {
+    for (i = 0; i < master.slave_count; i++) {
         m.getSlave(&slave, i);
         
         if (slave.alias) {