Skip to content

Commit b5fe0f8

Browse files
committed
Correctly check return value of getline
In case of an error (e.g. file not found or readable) getline returns -1 which causes an endless loop. Leave the loop in such cases. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1926110 13f79535-47bb-0310-9956-ffa450edef68
1 parent 32ebb6b commit b5fe0f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ update-changes:
171171
cp CHANGES CHANGES.tmp ; \
172172
awk -v fname=$$i 'BEGIN{done = 0; active = 0} \
173173
done == 0 && active == 0 && /^Changes with Apache /{ active = 1; print; next}; \
174-
/^( *\*|Changes with Apache )/ && active == 1 && done == 0{rec=$$0; while(getline<fname){if (! ($$0 ~ /^ *$$/)){print}}printf "\n";print rec; active = 0; done = 1; next} //;' \
174+
/^( *\*|Changes with Apache )/ && active == 1 && done == 0{rec=$$0; while((getline<fname) > 0){if (! ($$0 ~ /^ *$$/)){print}}printf "\n";print rec; active = 0; done = 1; next} //;' \
175175
CHANGES.tmp > CHANGES ; \
176176
rm CHANGES.tmp ; \
177177
if [ -n "$(SVN)" ] ; then \

0 commit comments

Comments
 (0)