dotcase: simplify some code

Change-Id: I472f7bee27ee4fb3f2df01291f63ce77e0d5f3ff