From: Ruediger Pluem Date: Wed, 4 Jun 2025 09:16:24 +0000 (+0000) Subject: Correctly check return value of getline X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b5fe0f863fae56ee0b0800af7bcd99827b6a9611;p=thirdparty%2Fapache%2Fhttpd.git 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 --- diff --git a/Makefile.in b/Makefile.in index e4961561b1..b5f86a9752 100644 --- a/Makefile.in +++ b/Makefile.in @@ -171,7 +171,7 @@ update-changes: cp CHANGES CHANGES.tmp ; \ awk -v fname=$$i 'BEGIN{done = 0; active = 0} \ done == 0 && active == 0 && /^Changes with Apache /{ active = 1; print; next}; \ - /^( *\*|Changes with Apache )/ && active == 1 && done == 0{rec=$$0; while(getline 0){if (! ($$0 ~ /^ *$$/)){print}}printf "\n";print rec; active = 0; done = 1; next} //;' \ CHANGES.tmp > CHANGES ; \ rm CHANGES.tmp ; \ if [ -n "$(SVN)" ] ; then \