diff options
-rw-r--r-- | block/iscsi.c | 3 | ||||
-rw-r--r-- | linux-user/syscall.c | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/block/iscsi.c b/block/iscsi.c index 4e216bd8aa..0b4b7210df 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -991,8 +991,7 @@ iscsi_aio_ioctl_cb(struct iscsi_context *iscsi, int status, acb->ioh->driver_status |= SG_ERR_DRIVER_SENSE; acb->ioh->sb_len_wr = acb->task->datain.size - 2; - ss = (acb->ioh->mx_sb_len >= acb->ioh->sb_len_wr) ? - acb->ioh->mx_sb_len : acb->ioh->sb_len_wr; + ss = MIN(acb->ioh->mx_sb_len, acb->ioh->sb_len_wr); memcpy(acb->ioh->sbp, &acb->task->datain.data[2], ss); } diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 674f70e70a..05f03919ff 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -12012,7 +12012,7 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, #endif #if defined(TARGET_NR_epoll_create1) && defined(CONFIG_EPOLL_CREATE1) case TARGET_NR_epoll_create1: - return get_errno(epoll_create1(arg1)); + return get_errno(epoll_create1(target_to_host_bitmask(arg1, fcntl_flags_tbl))); #endif #if defined(TARGET_NR_epoll_ctl) case TARGET_NR_epoll_ctl: |