[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3] linux-user: Use *at functions instead of cac
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v3] linux-user: Use *at functions instead of caching interp_prefix contents |
Date: |
Wed, 3 Jan 2018 17:07:19 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 |
On 12/29/2017 12:45 PM, address@hidden wrote:
> Hi,
>
> This series seems to have some coding style problems. See output below for
> more information:
>
> === OUTPUT BEGIN ===
> Checking PATCH 1/1: linux-user: Use *at functions instead of caching
> interp_prefix contents...
> ERROR: do not use assignment in if condition
> #25: FILE: linux-user/elfload.c:2206:
> + if (interp_dirfd < 0
Given that your compact if with embedded assignment makes the syntax
checker unhappy, should we look for a v4 that uses the construct we
debated in v2:
while (1) {
if (interp_dirfd > 0 && filename[0] == '/') {
fd = openat(interp_dirfd, filename + 1, O_RDONLY);
if (fd >= 0 || errno != ENOENT) {
break;
}
}
fd = open(filename, O_RDONLY);
break;
}
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [PATCH v3] linux-user: Use *at functions instead of caching interp_prefix contents,
Eric Blake <=