Small patch: fix double variable initializations in policy.c

Поиск
Список
Период
Сортировка
От Aleksander Alekseev
Тема Small patch: fix double variable initializations in policy.c
Дата
Msg-id 20160316112019.64057481@fujitsu
обсуждение исходный текст
Ответы Re: Small patch: fix double variable initializations in policy.c  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hello

I discovered a pretty weird code.

policy.c:1083

```
char       *qual_value;
ParseState *qual_pstate = make_parsestate(NULL);

/* parsestate is built just to build the range table */
qual_pstate = make_parsestate(NULL);
```

policy.c:1125

```
char       *with_check_value;
ParseState *with_check_pstate = make_parsestate(NULL);

/* parsestate is built just to build the range table */
with_check_pstate = make_parsestate(NULL);
```

I'm quite sure that there is no need to initialize these variables
twice. First patch fixes this. Also I discovered that policy.c is not
properly pgindent'ed. Second patch fixes this too.

Naturally I checked that after applying these patches PostgreSQL still
compiles and pass all regression tests.

--
Best regards,
Aleksander Alekseev
http://eax.me/

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Julien Rouhaud
Дата:
Сообщение: Re: Choosing parallel_degree
Следующее
От: Kyotaro HORIGUCHI
Дата:
Сообщение: Re: multivariate statistics v14