Re: Remove unnecessary else branch
От | Hamid Akhtar |
---|---|
Тема | Re: Remove unnecessary else branch |
Дата | |
Msg-id | CANugjhuk9CtvPkLHgtFDGOEnx8M5AkgGb52aZv-ta_J+GFMKYA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Remove unnecessary else branch (Heikki Linnakangas <hlinnaka@iki.fi>) |
Ответы |
Re: Remove unnecessary else branch
Re: Remove unnecessary else branch |
Список | pgsql-hackers |
On Tue, Oct 13, 2020 at 6:37 PM Heikki Linnakangas <hlinnaka@iki.fi> wrote:
On 13/10/2020 16:30, Li Japin wrote:
> Hi,
>
> I found in guc-file.l we can omit the else branch in AbsoluteConfigLocation().
It will compile the same, so it's just a matter of code readability or
taste which style is better here. I think we should leave it alone, it's
fine as it is.
- Heikki
I agree with Heikki from the code execution point of view.
"canonicalize_path(abs_path);" statement is also condition independent and can be pulled out of both if and else blocks. Removing unnecessary statements makes the code more readable, but it is a matter of choice/style.
В списке pgsql-hackers по дате отправления: