<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch master
in repository macports-base.

</pre>
<p><a href="https://github.com/macports/macports-base/commit/916167b2ed4b3c4dfa71da7cac2f39e5a3ef23c6">https://github.com/macports/macports-base/commit/916167b2ed4b3c4dfa71da7cac2f39e5a3ef23c6</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 916167b2ed4b3c4dfa71da7cac2f39e5a3ef23c6
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Sat Sep 8 08:33:41 2018 +1000

<span style='display:block; white-space:pre;color:#404040;'>    Remove checksum_types_count global
</span><span style='display:block; white-space:pre;color:#404040;'>    
</span><span style='display:block; white-space:pre;color:#404040;'>    It's only ever used in one place.
</span>---
 src/port1.0/portchecksum.tcl | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/port1.0/portchecksum.tcl b/src/port1.0/portchecksum.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 0b53af9..986890a 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/port1.0/portchecksum.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/port1.0/portchecksum.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -93,9 +93,6 @@ proc portchecksum::verify_checksum_format {type value} {
</span>     return $result
 }
 
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# The number of types we know.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-set checksum_types_count [llength $portchecksum::checksum_types]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> # Using global all_dist_files, parse the checksums and store them into the
 # global array checksums_array.
 #
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -106,19 +103,19 @@ set checksum_types_count [llength $portchecksum::checksum_types]
</span> # Portfile is in format #1 if:
 # (1) There is only one distfile.
 # (2) There are an even number of words in checksums (i.e. "md5 cksum sha1 cksum" = 4 words).
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# (3) There are no more than $portchecksum::checksum_types_count checksums specified.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# (3) There are no more checksums specified than $portchecksum::checksum_types contains.
</span> # (4) first word is one of the checksums types.
 #
 # return yes if the syntax was correct, no if there was a problem.
 proc portchecksum::parse_checksums {checksums_str} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>-    global checksums_array all_dist_files checksum_types_count
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    global checksums_array all_dist_files
</span> 
     # Parse the string of checksums.
     set nb_checksum [llength $checksums_str]
 
     if {[llength $all_dist_files] == 1
         && [expr {$nb_checksum % 2}] == 0
<span style='display:block; white-space:pre;background:#ffe0e0;'>-        && [expr {$nb_checksum / 2}] <= $checksum_types_count
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        && [expr {$nb_checksum / 2}] <= [llength $portchecksum::checksum_types]
</span>         && [lindex $checksums_str 0] in $portchecksum::checksum_types} {
         # Convert to format #2
         set checksums_str [linsert $checksums_str 0 [lindex $all_dist_files 0]]
</pre><pre style='margin:0'>

</pre>