directly use the new variable to compare with sizeof

Suggested by:	jilles
Loop again is nothing is available to read

Reported by:	jilles