retina icon indicating copy to clipboard operation
retina copied to clipboard

Refactor usages of `unsafe`

Open rbtr opened this issue 1 year ago • 3 comments

There are usages of unsafe which could be made safe https://github.com/microsoft/retina/blob/078d15b3612dc2abacd77b01dc9e6413dd3dbb2a/pkg/utils/utils_linux.go#L41

may be refactored as

func htons(i uint16) uint16 {
  b := make([]byte, 2)
  binary.BigEndian.PutUint16(b, i)
  return binary.BigEndian.Uint16(b)
}

rbtr avatar Mar 20 '24 17:03 rbtr

Hi, could you please assign this issue to me?

Troy-Butler avatar Mar 20 '24 19:03 Troy-Butler

@Troy-Butler Assigned the issue to you.

vakalapa avatar Mar 20 '24 21:03 vakalapa

This issue is stale because it has been open for 7 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] avatar Mar 28 '24 00:03 github-actions[bot]