summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2019-12-21 12:21:04 -0500
committerRich Felker <dalias@aerifal.cx>2019-12-21 12:21:04 -0500
commit4d706410779f399e5969439f6005abcee553b01d (patch)
tree5143a17b2de0d2f8cd4c95f1a4c5fccb3667d76d
parentd6a62addce7e07416a5bc889f39594e67d785a0d (diff)
downloadmusl-4d706410779f399e5969439f6005abcee553b01d.tar.gz
don't continue looping through ioctl compat_map after finding match
there's only one matching entry for any given command so this had no functional distinction, but additional loops are pointless and wasteful.
-rw-r--r--src/misc/ioctl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/misc/ioctl.c b/src/misc/ioctl.c
index 84a50d44..3c1595e2 100644
--- a/src/misc/ioctl.c
+++ b/src/misc/ioctl.c
@@ -128,6 +128,7 @@ int ioctl(int fd, int req, ...)
r = __syscall(SYS_ioctl, fd, compat_map[i].old_req, u.buf);
if (r<0) break;
convert_ioctl_struct(&compat_map[i], u.buf, arg, R);
+ break;
}
}
return __syscall_ret(r);