aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Gustafsson <dgustafsson@postgresql.org>2023-04-24 11:16:17 +0200
committerDaniel Gustafsson <dgustafsson@postgresql.org>2023-04-24 11:16:17 +0200
commit34e09e71aca51a9e722ff3ec819c0d92f4247bdd (patch)
tree1d761ace1c4997199f1b703f5031ad12aff29969
parentf4a4a18ecbdb74da70679c7bcaa395f66b68c4af (diff)
downloadpostgresql-34e09e71aca51a9e722ff3ec819c0d92f4247bdd.tar.gz
postgresql-34e09e71aca51a9e722ff3ec819c0d92f4247bdd.zip
Remove duplicate lines of code
Commit 6df7a9698bb accidentally included two identical prototypes for default_multirange_selectivi() and commit 086cf1458c6 added a break; statement where one was already present, thus duplicating it. While there is no bug caused by this, fix by removing the duplicated lines as they provide no value. Backpatch the fix for duplicate prototypes to v14 and the duplicate break statement fix to all supported branches to avoid backpatching hazards due to the removal. Reported-by: Anton Voloshin <a.voloshin@postgrespro.ru> Discussion: https://postgr.es/m/0e69cb60-0176-f6d0-7e15-6478b7d85724@postgrespro.ru
-rw-r--r--src/backend/utils/adt/multirangetypes_selfuncs.c1
-rw-r--r--src/interfaces/ecpg/preproc/variable.c1
2 files changed, 0 insertions, 2 deletions
diff --git a/src/backend/utils/adt/multirangetypes_selfuncs.c b/src/backend/utils/adt/multirangetypes_selfuncs.c
index 8d085ca8d4f..0360a17d8c6 100644
--- a/src/backend/utils/adt/multirangetypes_selfuncs.c
+++ b/src/backend/utils/adt/multirangetypes_selfuncs.c
@@ -35,7 +35,6 @@ static double calc_multirangesel(TypeCacheEntry *typcache,
VariableStatData *vardata,
const MultirangeType *constval, Oid operator);
static double default_multirange_selectivity(Oid operator);
-static double default_multirange_selectivity(Oid operator);
static double calc_hist_selectivity(TypeCacheEntry *typcache,
VariableStatData *vardata,
const MultirangeType *constval,
diff --git a/src/interfaces/ecpg/preproc/variable.c b/src/interfaces/ecpg/preproc/variable.c
index 887d479e735..8926676ab71 100644
--- a/src/interfaces/ecpg/preproc/variable.c
+++ b/src/interfaces/ecpg/preproc/variable.c
@@ -105,7 +105,6 @@ find_struct_member(char *name, char *str, struct ECPGstruct_member *members, int
else
return find_struct_member(name, ++end, members->type->u.members, brace_level);
break;
- break;
case '.':
if (members->type->type == ECPGt_array)
return find_struct_member(name, end, members->type->u.element->u.members, brace_level);