[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 07/13] net: relocate paths to helpers and scripts
From: |
Paolo Bonzini |
Subject: |
Re: [PATCH 07/13] net: relocate paths to helpers and scripts |
Date: |
Wed, 2 Sep 2020 10:40:29 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 |
On 02/09/20 10:24, Philippe Mathieu-Daudé wrote:
>> - helper = bridge->has_helper ? bridge->helper : DEFAULT_BRIDGE_HELPER;
>> + if (!bridge->has_helper) {
>> + helper = default_helper = get_relocated_path(DEFAULT_BRIDGE_HELPER);
>> + } else {
>> + helper = bridge->helper;
>> + }
> Nitpicking, I find easier to review adding simply once after out of the
> if() statement:
>
> helper = bridge->helper;
>
Even better,
- helper = bridge->has_helper ? bridge->helper : DEFAULT_BRIDGE_HELPER;
+ helper = bridge->has_helper ? bridge->helper : NULL;
and move the get_relocated_path in net_bridge_run_helper.
Paolo
- [PATCH 01/13] fuzz: use qemu_get_exec_dir, (continued)
- [PATCH 01/13] fuzz: use qemu_get_exec_dir, Paolo Bonzini, 2020/09/01
- [PATCH 05/13] oslib-posix: relocate path to /var, Paolo Bonzini, 2020/09/01
- [PATCH 03/13] oslib-posix: default exec_dir to bindir, Paolo Bonzini, 2020/09/01
- [PATCH 07/13] net: relocate paths to helpers and scripts, Paolo Bonzini, 2020/09/01
- [PATCH 09/13] vl: relocate path to configuration file, Paolo Bonzini, 2020/09/01
- [PATCH 06/13] module: relocate path to modules, Paolo Bonzini, 2020/09/01
- [PATCH 02/13] oslib: do not call g_strdup from qemu_get_exec_dir, Paolo Bonzini, 2020/09/01
- [PATCH 08/13] vl: relocate paths to data directories, Paolo Bonzini, 2020/09/01
- [PATCH 12/13] ui: relocate paths to icons and translations, Paolo Bonzini, 2020/09/01