From c0b806ef3def4fa3c6c101a533b4b6f44687e7be Mon Sep 17 00:00:00 2001 From: Rajat Chopra Date: Tue, 21 Apr 2026 13:36:20 -0700 Subject: [PATCH] skip lint check, rename bytes variable as it overwrites bytes package Signed-off-by: Rajat Chopra --- internal/links/pciinfo.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/internal/links/pciinfo.go b/internal/links/pciinfo.go index 3babe82..eb00ca4 100644 --- a/internal/links/pciinfo.go +++ b/internal/links/pciinfo.go @@ -32,15 +32,16 @@ type PciInfo nvml.PciInfo // BusID provides a utility function that returns the string representation of the bus ID. // Note that the []int8 slice member is named BusId. func (p PciInfo) BusID() string { - var bytes []byte + var pbytes []byte for _, b := range p.BusId { - if b >= 0 && byte(b) == '\x00' { + // #nosec G115 + if byte(b) == '\x00' { break } // #nosec G115 - bytes = append(bytes, byte(b)) + pbytes = append(pbytes, byte(b)) } - id := strings.ToLower(string(bytes)) + id := strings.ToLower(string(pbytes)) if id != "0000" { id = strings.TrimPrefix(id, "0000")