From 4d706410779f399e5969439f6005abcee553b01d Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Sat, 21 Dec 2019 12:21:04 -0500 Subject: 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. --- src/misc/ioctl.c | 1 + 1 file changed, 1 insertion(+) 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); -- cgit v1.2.1