ret is always 0 here, so there's no point returning it. the else is unnecessary as well.