Skip to content

Commit

Permalink
fix s2b go vet warning (#967)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangyunhao116 authored Feb 12, 2021
1 parent a88030b commit 52a8ab6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bytesconv.go
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ func s2b(s string) (b []byte) {
/* #nosec G103 */
bh := (*reflect.SliceHeader)(unsafe.Pointer(&b))
/* #nosec G103 */
sh := *(*reflect.StringHeader)(unsafe.Pointer(&s))
sh := (*reflect.StringHeader)(unsafe.Pointer(&s))
bh.Data = sh.Data
bh.Len = sh.Len
bh.Cap = sh.Len
Expand Down

0 comments on commit 52a8ab6

Please sign in to comment.