ref: e95af319e659761f5347188e237d3521d0e59c6b
parent: d1771d74328a72c4499bf92f1eae76253ebad43e
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Mon Apr 18 17:03:40 EDT 2022
ip/torrent: fix silly readn() error check (thanks pr)
--- a/sys/src/cmd/ip/torrent.c
+++ b/sys/src/cmd/ip/torrent.c
@@ -404,7 +404,7 @@
}
if((incoming && !i) || (!incoming && i)){
n = 20 + 8 + sizeof(infohash);
- if((n = readn(fd, buf, n)) != n)
+ if(readn(fd, buf, n) != n)
return 1;
if(memcmp(buf, "\x13BitTorrent protocol", 20))
return 0;
--
⑨