From c8c681a0853f73148e6b53e123be665f27c2010a Mon Sep 17 00:00:00 2001 From: Riccardo Grieco Date: Thu, 25 Aug 2022 14:53:17 +0200 Subject: [PATCH] Improve HumanWrenchProvider readability Co-authored-by: Silvio Traversaro --- devices/HumanWrenchProvider/HumanWrenchProvider.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/devices/HumanWrenchProvider/HumanWrenchProvider.cpp b/devices/HumanWrenchProvider/HumanWrenchProvider.cpp index ae235961d..8043d16a0 100644 --- a/devices/HumanWrenchProvider/HumanWrenchProvider.cpp +++ b/devices/HumanWrenchProvider/HumanWrenchProvider.cpp @@ -1279,7 +1279,8 @@ bool HumanWrenchProvider::attach(yarp::dev::PolyDriver* poly) while (pImpl->iHumanState->getNumberOfJoints() == 0 || pImpl->iHumanState->getNumberOfJoints() != pImpl->iHumanState->getJointNames().size()) { yError() << LogPrefix<<"The IHumanState interface might not be ready"; - if(count--==0) return false; + count--; + if(count==0) return false; } yInfo() << LogPrefix << deviceName << "attach() successful";