Skip to content

Commit

Permalink
fix: fix slice init length (#3695)
Browse files Browse the repository at this point in the history
  • Loading branch information
cuishuang authored Feb 7, 2025
1 parent 39323ef commit 1929342
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pki/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -506,8 +506,8 @@ func DeepEqualIPsAltNames(oldIPs, newIPs []net.IP) bool {
if len(oldIPs) != len(newIPs) {
return false
}
oldIPsStrings := make([]string, len(oldIPs))
newIPsStrings := make([]string, len(newIPs))
oldIPsStrings := make([]string, 0, len(oldIPs))
newIPsStrings := make([]string, 0, len(newIPs))
for i := range oldIPs {
oldIPsStrings = append(oldIPsStrings, oldIPs[i].String())
newIPsStrings = append(newIPsStrings, newIPs[i].String())
Expand Down

0 comments on commit 1929342

Please sign in to comment.