...G...PS. [ZBX-9002] added mutex initialization, removed unnecessary condition check, fixed code formatting