Skip to content

Commit

Permalink
Fix two same 'if' branches with the same implementation
Browse files Browse the repository at this point in the history
Signed-off-by: João Vilaça <jvilaca@redhat.com>
  • Loading branch information
machadovilaca committed Oct 15, 2021
1 parent 1ccbc7a commit 4e0234e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pkg/virt-operator/resource/generate/install/strategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -484,10 +484,7 @@ func mostRecentConfigMap(configMaps []*corev1.ConfigMap) *corev1.ConfigMap {
// choose the most recent configmap if multiple match.
mostRecentTime := metav1.Time{}
for _, config := range configMaps {
if configMap == nil {
configMap = config
mostRecentTime = config.ObjectMeta.CreationTimestamp
} else if mostRecentTime.Before(&config.ObjectMeta.CreationTimestamp) {
if configMap == nil || mostRecentTime.Before(&config.ObjectMeta.CreationTimestamp) {
configMap = config
mostRecentTime = config.ObjectMeta.CreationTimestamp
}
Expand Down

0 comments on commit 4e0234e

Please sign in to comment.