tool/CommandAlias.cpp
changeset 1870 0cee1fb7f0fd
parent 1869 14f634f5b613
child 1968 4f682084c643
--- a/tool/CommandAlias.cpp	Thu Mar 11 15:03:52 2010 +0100
+++ b/tool/CommandAlias.cpp	Thu Mar 11 15:17:25 2010 +0100
@@ -81,7 +81,6 @@
     uint16_t alias;
     stringstream err, strAlias;
     int number;
-	MasterIndexList masterIndices;
     SlaveList slaves;
     SlaveList::const_iterator si;
 
@@ -100,12 +99,7 @@
     }
     alias = number;
 
-	masterIndices = getMasterIndices();
-    if (masterIndices.size() != 1) {
-        err << getName() << " requires to select a single master!";
-        throwInvalidUsageException(err);
-    }
-    MasterDevice m(masterIndices.front());
+    MasterDevice m(getSingleMasterIndex());
     m.open(MasterDevice::ReadWrite);
     slaves = selectedSlaves(m);