Move tun to subpackage
This commit is contained in:
parent
65a74f3175
commit
0a63188afa
9 changed files with 127 additions and 131 deletions
7
misc.go
7
misc.go
|
|
@ -41,13 +41,6 @@ func (a *AtomicBool) Set(val bool) {
|
|||
atomic.StoreInt32(&a.flag, flag)
|
||||
}
|
||||
|
||||
/* Integer manipulation */
|
||||
|
||||
func toInt32(n uint32) int32 {
|
||||
mask := uint32(1 << 31)
|
||||
return int32(-(n & mask) + (n & ^mask))
|
||||
}
|
||||
|
||||
func min(a, b uint) uint {
|
||||
if a > b {
|
||||
return b
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue