r2996: readability fix for length check; no semantic changes