projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d6a62ad
)
don't continue looping through ioctl compat_map after finding match
author
Rich Felker
<dalias@aerifal.cx>
Sat, 21 Dec 2019 17:21:04 +0000
(12:21 -0500)
committer
Rich Felker
<dalias@aerifal.cx>
Sat, 21 Dec 2019 17:21:04 +0000
(12:21 -0500)
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
patch
|
blob
|
history
diff --git
a/src/misc/ioctl.c
b/src/misc/ioctl.c
index 84a50d44f75b81fccf522f1bd0cde72e465a2e90..3c1595e25fdaf713bccdedc929b6f802d914d44f 100644
(file)
--- 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);