Commit 13fcfefd authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent a8cb65bb
......@@ -317,7 +317,7 @@ func (p *AnswerLockedTransactions) NEODecode(data []byte) (int, error) {
data = data[4:]
p.TidDict = make(map[Tid]Tid, l)
m := p.TidDict
for i := 0; i < l; i++ {
for i := 0; uint32(i) < l; i++ {
key = Tid(binary.BigEndian.Uint64(data[0:]))
m[key] = Tid(binary.BigEndian.Uint64(data[8:]))
data = data[16:]
......@@ -873,7 +873,7 @@ func (p *AnswerObjectUndoSerial) NEODecode(data []byte) (int, error) {
IsCurrent bool
}, l)
m := p.ObjectTIDDict
for i := 0; i < l; i++ {
for i := 0; uint32(i) < l; i++ {
key = Oid(binary.BigEndian.Uint64(data[0:]))
m[key].CurrentSerial = Tid(binary.BigEndian.Uint64(data[8:]))
m[key].UndoSerial = Tid(binary.BigEndian.Uint64(data[16:]))
......@@ -926,7 +926,7 @@ func (p *CheckReplicas) NEODecode(data []byte) (int, error) {
data = data[4:]
p.PartitionDict = make(map[uint32]UUID, l)
m := p.PartitionDict
for i := 0; i < l; i++ {
for i := 0; uint32(i) < l; i++ {
key = binary.BigEndian.Uint32(data[0:])
m[key] = UUID(int32(binary.BigEndian.Uint32(data[4:])))
data = data[8:]
......
......@@ -249,7 +249,7 @@ func (d *decoder) emitmap(assignto string, obj types.Object, typ *types.Map) {
// TODO if size(item)==const - check l in one go
//d.emit("if len(data) < l { return 0, ErrDecodeOverflow }")
d.emit("m := %v", assignto)
d.emit("for i := 0; i < l; i++ {")
d.emit("for i := 0; uint32(i) < l; i++ {")
d.emitobjtype("key", obj, typ.Key()) // TODO -> :=
d.emitobjtype("m[key]", obj, typ.Elem())
d.emit("data = data[%v:]", d.n) // FIXME wrt map of map ?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment