Skip to content

Commit 32a2560

Browse files
committed
CodeQL fix
1 parent 0bb5ef2 commit 32a2560

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tests/slo/native/node_hints/dynnode_traffic.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,11 @@ func getMetricValue(ctx context.Context, cfg *config.Config, query string) float
5858
}
5959

6060
func formatNodeID(v model.LabelValue) uint32 {
61-
id, err := strconv.Atoi(string(v))
61+
i64, err := strconv.ParseUint(string(v), 10, 32)
6262
if err != nil {
6363
log.Panicf("formatNodeID failed: %v", err)
6464
}
65-
66-
return uint32(id)
65+
return uint32(i64)
6766
}
6867

6968
func NewEstimator(ctx context.Context, storage *Storage) *Estimator {

0 commit comments

Comments
 (0)