/*
NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
if !bytes.HasPrefix(pkt.Path[:], []byte(pathSrc)) {
return false
}
- if bytes.Compare(bufR.Bytes(), []byte(data)) != 0 {
+ if !bytes.Equal(bufR.Bytes(), []byte(data)) {
return false
}
} else {
if pkt.Type != PktTypeTrns {
return false
}
- if bytes.Compare(pkt.Path[:MTHSize], vias[i+1][:]) != 0 {
+ if !bytes.Equal(pkt.Path[:MTHSize], vias[i+1][:]) {
return false
}
}