diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2022-07-13 20:16:46 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2022-07-13 21:52:30 -0600 |
commit | db7047c394edbcc713accda2a15f201a5b400ef7 (patch) | |
tree | 0b8fb9c1b4176af762422197cca721145cda91a6 /lib/btrfs/internal/misc.go | |
parent | 166e51d3a6f81834cc89aec36015f05f350be31e (diff) |
Misc tidy up
Diffstat (limited to 'lib/btrfs/internal/misc.go')
-rw-r--r-- | lib/btrfs/internal/misc.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/btrfs/internal/misc.go b/lib/btrfs/internal/misc.go index eb5c287..3bc5402 100644 --- a/lib/btrfs/internal/misc.go +++ b/lib/btrfs/internal/misc.go @@ -26,15 +26,17 @@ func (k Key) String() string { } func (a Key) Cmp(b Key) int { - if d := containers.CmpUint(a.ObjectID, b.ObjectID); d != 0 { + if d := containers.NativeCmp(a.ObjectID, b.ObjectID); d != 0 { return d } - if d := containers.CmpUint(a.ItemType, b.ItemType); d != 0 { + if d := containers.NativeCmp(a.ItemType, b.ItemType); d != 0 { return d } - return containers.CmpUint(a.Offset, b.Offset) + return containers.NativeCmp(a.Offset, b.Offset) } +var _ containers.Ordered[Key] = Key{} + type Time struct { Sec int64 `bin:"off=0x0, siz=0x8"` // Number of seconds since 1970-01-01T00:00:00Z. NSec uint32 `bin:"off=0x8, siz=0x4"` // Number of nanoseconds since the beginning of the second. |