mirror of
https://github.com/golang/go.git
synced 2025-11-11 14:11:04 +00:00
net: simplify internal dtoi and xtoi funcs
Callers pass strings sliced as necessary instead of giving an offset. Fixes #16350 Change-Id: I7ba896f6ff09e0fd0094ca6c5af5d9a81622f15e Reviewed-on: https://go-review.googlesource.com/27206 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
9c13eb3729
commit
00b779aeed
13 changed files with 74 additions and 78 deletions
|
|
@ -26,7 +26,7 @@ func readProtocols() {
|
|||
if len(f) < 2 {
|
||||
continue
|
||||
}
|
||||
if proto, _, ok := dtoi(f[1], 0); ok {
|
||||
if proto, _, ok := dtoi(f[1]); ok {
|
||||
if _, ok := protocols[f[0]]; !ok {
|
||||
protocols[f[0]] = proto
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue