aboutsummaryrefslogtreecommitdiff
path: root/vendor/golang.org/x/sys/unix/dev_linux.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2018-02-13 01:17:35 +0100
committerDimitri Sokolyuk <demon@dim13.org>2018-02-13 01:17:35 +0100
commitc32d9bf24c3b670c3a56ea55aeefb6232f3d4ec8 (patch)
treef9891ff5b851d40c2f48c8e73e36e32197bfcc89 /vendor/golang.org/x/sys/unix/dev_linux.go
parent886201867ac7383535c08d81dbabc6c9c77fe855 (diff)
switch to subcommands
Diffstat (limited to 'vendor/golang.org/x/sys/unix/dev_linux.go')
-rw-r--r--vendor/golang.org/x/sys/unix/dev_linux.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/vendor/golang.org/x/sys/unix/dev_linux.go b/vendor/golang.org/x/sys/unix/dev_linux.go
index c902c39..d165d6f 100644
--- a/vendor/golang.org/x/sys/unix/dev_linux.go
+++ b/vendor/golang.org/x/sys/unix/dev_linux.go
@@ -34,9 +34,9 @@ func Minor(dev uint64) uint32 {
// Mkdev returns a Linux device number generated from the given major and minor
// components.
func Mkdev(major, minor uint32) uint64 {
- dev := uint64((major & 0x00000fff) << 8)
- dev |= uint64((major & 0xfffff000) << 32)
- dev |= uint64((minor & 0x000000ff) << 0)
- dev |= uint64((minor & 0xffffff00) << 12)
+ dev := (uint64(major) & 0x00000fff) << 8
+ dev |= (uint64(major) & 0xfffff000) << 32
+ dev |= (uint64(minor) & 0x000000ff) << 0
+ dev |= (uint64(minor) & 0xffffff00) << 12
return dev
}