aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2021-07-23 03:43:39 +0000
committerrodri <rgl@antares-labs.eu>2021-07-23 03:43:39 +0000
commitf54a8666413d80db3bda3de6e17f795faf7790eb (patch)
tree914e6ec2401c3ca5061982deb7615274d968007d
parent615575f7dca0e43ecb23c4ab1ea7fd2e93c4e3b4 (diff)
downloadmusw-f54a8666413d80db3bda3de6e17f795faf7790eb.tar.gz
musw-f54a8666413d80db3bda3de6e17f795faf7790eb.tar.bz2
musw-f54a8666413d80db3bda3de6e17f795faf7790eb.zip
some corrections.
-rw-r--r--lobby.c2
-rw-r--r--musw.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/lobby.c b/lobby.c
index 62322ad..4004983 100644
--- a/lobby.c
+++ b/lobby.c
@@ -35,7 +35,7 @@ static int
lobby_leaveseat(Lobby *l, ulong idx)
{
if(idx < l->seats.cap-1)
- memmove(&l->seats.fds[idx], &l->seats.fds[idx+1], l->seats.cap*sizeof(int) - (l->seats.len + 1)*sizeof(int));
+ memmove(&l->seats.fds[idx], &l->seats.fds[idx+1], l->seats.cap*sizeof(int) - (idx + 1)*sizeof(int));
l->seats.len--;
return 0;
}
diff --git a/musw.c b/musw.c
index f58765c..a88f0fc 100644
--- a/musw.c
+++ b/musw.c
@@ -16,7 +16,7 @@ threadnetin(void *arg)
while((n = ioread(io, fd, buf, sizeof buf)) > 0)
if(iowrite(io, 1, buf, n) != n)
- fprint(2, "iowrite: %r\n");
+ fprint(2, "netin iowrite: %r\n");
closeioproc(io);
}
@@ -32,7 +32,7 @@ threadnetout(void *arg)
while((n = ioread(io, 0, buf, sizeof buf)) > 0)
if(iowrite(io, fd, buf, n) != n)
- fprint(2, "iowrite: %r\n");
+ fprint(2, "netout iowrite: %r\n");
closeioproc(io);
}