summaryrefslogtreecommitdiff
path: root/sys/src/cmd/ip
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2022-04-18 21:03:40 +0000
committercinap_lenrek <cinap_lenrek@felloff.net>2022-04-18 21:03:40 +0000
commit9993b3909e504b29083dae07822e5489917d5cb8 (patch)
tree91f5ff31d0f850d265c51c6b14267144ec78cb81 /sys/src/cmd/ip
parent061ec57021a7c813844582f6f1973dafae6e668b (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.c2
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;