Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for rightToIndex (0.17 sec)

  1. src/cmd/vendor/golang.org/x/sys/unix/cap_freebsd.go

    		4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
    	}
    )
    
    func capidxbit(right uint64) int {
    	return int((right >> 57) & 0x1f)
    }
    
    func rightToIndex(right uint64) (int, error) {
    	idx := capidxbit(right)
    	if idx < 0 || idx >= len(bit2idx) {
    		return -2, fmt.Errorf("index for right 0x%x out of range", right)
    	}
    	return bit2idx[idx], nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 5K bytes
    - Viewed (0)
Back to top