util/mkerr.pl: fix perl warning
[openssl.git] / util / mkerr.pl
index 5dd89582c527429f5a705a3d953eb3d5b2754b86..9a3b634d57395279f53855bebb5341d1d7cdf2f3 100644 (file)
@@ -14,6 +14,7 @@ my $pack_errcode;
 my $load_errcode;
 
 my $errcount;
+my $year = (localtime)[5] + 1900;
 
 while (@ARGV) {
        my $arg = $ARGV[0];
@@ -392,7 +393,7 @@ foreach $lib (keys %csrc)
        } else {
            push @out,
 "/* ====================================================================\n",
-" * Copyright (c) 2001-2010 The OpenSSL Project.  All rights reserved.\n",
+" * Copyright (c) 2001-$year The OpenSSL Project.  All rights reserved.\n",
 " *\n",
 " * Redistribution and use in source and binary forms, with or without\n",
 " * modification, are permitted provided that the following conditions\n",
@@ -577,7 +578,7 @@ EOF
        print OUT <<"EOF";
 /* $cfile */
 /* ====================================================================
- * Copyright (c) 1999-2010 The OpenSSL Project.  All rights reserved.
+ * Copyright (c) 1999-$year The OpenSSL Project.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -770,7 +771,7 @@ EOF
        undef %err_reason_strings;
 }
 
-if($debug && defined(%notrans)) {
+if($debug && %notrans) {
        print STDERR "The following function codes were not translated:\n";
        foreach(sort keys %notrans)
        {
@@ -788,7 +789,7 @@ foreach (keys %rcodes) {
        push (@runref, $_) unless exists $urcodes{$_};
 }
 
-if($debug && defined(@funref) ) {
+if($debug && @funref) {
        print STDERR "The following function codes were not referenced:\n";
        foreach(sort @funref)
        {
@@ -796,7 +797,7 @@ if($debug && defined(@funref) ) {
        }
 }
 
-if($debug && defined(@runref) ) {
+if($debug && @runref) {
        print STDERR "The following reason codes were not referenced:\n";
        foreach(sort @runref)
        {