From: Mark Andrews Date: Sun, 27 Jun 2010 23:43:22 +0000 (+0000) Subject: handle very short source files X-Git-Tag: v9.5.3b1~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9dc56d5d4aaf8775450e7c4d40e4657d4692383f;p=thirdparty%2Fbind9.git handle very short source files --- diff --git a/util/update_copyrights b/util/update_copyrights index a18cfdb80f6..021f218a4a3 100644 --- a/util/update_copyrights +++ b/util/update_copyrights @@ -15,7 +15,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: update_copyrights,v 1.50.92.5 2009/06/12 04:07:43 marka Exp $ +# $Id: update_copyrights,v 1.50.92.6 2010/06/27 23:43:22 marka Exp $ require 5.002; @@ -484,7 +484,8 @@ foreach $file (keys %file_types) { $end = "\n"; } - if ($first !~ /$keyword_pat/ && $_ !~ /$keyword_pat/) { + if ($first !~ /$keyword_pat/ && + (!defined($_) || $_ !~ /$keyword_pat/)) { $end = "\n$nonspaceprefix" if ($type eq "MAN"); print TARGET "$start\$"; print TARGET "Id"; @@ -492,7 +493,7 @@ foreach $file (keys %file_types) { } print TARGET $first if $first !~ /^\s*$/; - print TARGET $_; + print TARGET $_ if (defined($_)); } close(TARGET); close(SOURCE);