MCPcopy Index your code
hub / github.com/godbus/dbus / align

Method align

decoder.go:47–53  ·  view source on GitHub ↗

align aligns the input to the given boundary and panics on error.

(n int)

Source from the content-addressed store, hash-verified

45
46// align aligns the input to the given boundary and panics on error.
47func (dec *decoder) align(n int) {
48 if dec.pos%n != 0 {
49 newpos := (dec.pos + n - 1) & ^(n - 1)
50 dec.read2buf(newpos - dec.pos)
51 dec.pos = newpos
52 }
53}
54
55// Calls binary.Read(dec.in, dec.order, v) and panics on read errors.
56func (dec *decoder) binread(v any) {

Callers 5

decodeUMethod · 0.95
decodeMethod · 0.95
DecodeMessageWithFDsFunction · 0.45
EncodeToWithFDsMethod · 0.45
ReadMessageMethod · 0.45

Calls 1

read2bufMethod · 0.95

Tested by

no test coverage detected