summaryrefslogtreecommitdiff
path: root/hw/xquartz/console_redirect.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xquartz/console_redirect.c')
-rw-r--r--hw/xquartz/console_redirect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/xquartz/console_redirect.c b/hw/xquartz/console_redirect.c
index 7b92eca39..1e0e56bad 100644
--- a/hw/xquartz/console_redirect.c
+++ b/hw/xquartz/console_redirect.c
@@ -336,7 +336,7 @@ xq_asl_log_fd(aslclient asl, aslmsg msg, int level, int fd)
{
/* Reallocate if we need more space */
if (fd >= n_redirect_fds) {
- size_t new_n = 1 << (ffs(fd) + 1);
+ size_t new_n = 1 << (fls(fd) + 1);
asl_redirect *new_array =
realloc(redirect_fds, new_n *
sizeof(*redirect_fds));