]> granicus.if.org Git - python/commit
#2560: remove an unnecessary 'for' loop from my_fgets() in Parser/myreadline.c.
authorAndrew M. Kuchling <amk@amk.ca>
Mon, 22 Feb 2010 22:48:41 +0000 (22:48 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Mon, 22 Feb 2010 22:48:41 +0000 (22:48 +0000)
commitb64d61369aeda5f0af40a0daf3af648c433492a3
treec0ac3cf6cd3464737c5c5e943f19c07f0b7846d0
parent5cac46dd413766411dc12758d53b6a7e6b691171
#2560: remove an unnecessary 'for' loop from my_fgets() in Parser/myreadline.c.
Noted by Joseph Armbruster; patch by Jessica McKellar.

The original code was 'for (;;) {...}', where ... ended
with a 'return -2' statement and did not contain a 'break' or 'continue'
statement.  Therefore, the body of the loop is always executed once.

Once upon a time there was a 'continue' in the loop, but it was removed in
rev36346, committed by mwh on Wed Jul 7 17:44:12 2004.
Misc/NEWS
Parser/myreadline.c