diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2022-04-18 21:03:40 +0000 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2022-04-18 21:03:40 +0000 |
commit | 9993b3909e504b29083dae07822e5489917d5cb8 (patch) | |
tree | 91f5ff31d0f850d265c51c6b14267144ec78cb81 /sys/src/cmd/ip | |
parent | 061ec57021a7c813844582f6f1973dafae6e668b (diff) |
ip/torrent: fix silly readn() error check (thanks pr)
Diffstat (limited to 'sys/src/cmd/ip')
-rw-r--r-- | sys/src/cmd/ip/torrent.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/cmd/ip/torrent.c b/sys/src/cmd/ip/torrent.c index 374fd97ad..7177266f2 100644 --- a/sys/src/cmd/ip/torrent.c +++ b/sys/src/cmd/ip/torrent.c @@ -404,7 +404,7 @@ peer(int fd, int incoming, char *addr) } 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; |