1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-11-08 17:55:59 +01:00

Don't pass pid to addMapping.

addMapping assumes the piddelta is constant, so it doesn't need
the pid.
This commit is contained in:
Juliusz Chroboczek 2022-12-30 20:56:50 +01:00
parent f0bb45e6f4
commit 774432bd5e

View file

@ -45,7 +45,7 @@ func (m *Map) Map(seqno uint16, pid uint16) (bool, uint16, uint16) {
m.nextPid = pid
return true, seqno, 0
}
addMapping(m, seqno, pid, m.delta, m.pidDelta)
addMapping(m, seqno, m.delta, m.pidDelta)
m.next = seqno + 1
m.nextPid = pid
return true, seqno + m.delta, m.pidDelta
@ -70,7 +70,7 @@ func (m *Map) reset() {
m.entries = nil
}
func addMapping(m *Map, seqno, pid uint16, delta, pidDelta uint16) {
func addMapping(m *Map, seqno, delta, pidDelta uint16) {
if len(m.entries) == 0 {
// this shouldn't happen
return