Avoid an unnecessary strcmp; just pass the flags value at the point of origin.