diff options
author | Rich Felker <dalias@aerifal.cx> | 2019-12-21 12:21:04 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2019-12-21 12:21:04 -0500 |
commit | 4d706410779f399e5969439f6005abcee553b01d (patch) | |
tree | 5143a17b2de0d2f8cd4c95f1a4c5fccb3667d76d /src/misc/ioctl.c | |
parent | d6a62addce7e07416a5bc889f39594e67d785a0d (diff) | |
download | musl-4d706410779f399e5969439f6005abcee553b01d.zip musl-4d706410779f399e5969439f6005abcee553b01d.tar.gz musl-4d706410779f399e5969439f6005abcee553b01d.tar.bz2 |
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.
Diffstat (limited to 'src/misc/ioctl.c')
-rw-r--r-- | src/misc/ioctl.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/misc/ioctl.c b/src/misc/ioctl.c index 84a50d4..3c1595e 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); |