Conditionally compare strcmp return values for clarity