Count link and syscall failures instead of printing them
This commit is contained in:
@@ -156,22 +156,3 @@ func parseHeader(buf []byte) (parsed, bool) {
|
||||
}
|
||||
return p, true
|
||||
}
|
||||
|
||||
func firstDiff(got, want []byte) (int, int) {
|
||||
n := len(got)
|
||||
if len(want) < n {
|
||||
n = len(want)
|
||||
}
|
||||
for i := 0; i < n; i++ {
|
||||
if got[i] != want[i] {
|
||||
bits := 0
|
||||
x := got[i] ^ want[i]
|
||||
for x != 0 {
|
||||
bits += int(x & 1)
|
||||
x >>= 1
|
||||
}
|
||||
return i, bits
|
||||
}
|
||||
}
|
||||
return -1, 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user