aboutsummaryrefslogtreecommitdiff
path: root/contrib/file_fdw/file_fdw.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/file_fdw/file_fdw.c')
-rw-r--r--contrib/file_fdw/file_fdw.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/contrib/file_fdw/file_fdw.c b/contrib/file_fdw/file_fdw.c
index 412dcabe55e..549821ca84c 100644
--- a/contrib/file_fdw/file_fdw.c
+++ b/contrib/file_fdw/file_fdw.c
@@ -360,8 +360,7 @@ fileGetOptions(Oid foreigntableid,
ForeignServer *server;
ForeignDataWrapper *wrapper;
List *options;
- ListCell *lc,
- *prev;
+ ListCell *lc;
/*
* Extract options from FDW objects. We ignore user mappings because
@@ -387,7 +386,6 @@ fileGetOptions(Oid foreigntableid,
*/
*filename = NULL;
*is_program = false;
- prev = NULL;
foreach(lc, options)
{
DefElem *def = (DefElem *) lfirst(lc);
@@ -395,17 +393,16 @@ fileGetOptions(Oid foreigntableid,
if (strcmp(def->defname, "filename") == 0)
{
*filename = defGetString(def);
- options = list_delete_cell(options, lc, prev);
+ options = foreach_delete_current(options, lc);
break;
}
else if (strcmp(def->defname, "program") == 0)
{
*filename = defGetString(def);
*is_program = true;
- options = list_delete_cell(options, lc, prev);
+ options = foreach_delete_current(options, lc);
break;
}
- prev = lc;
}
/*