diff --git a/src/bin/csql/copy_options.c b/src/bin/csql/copy_options.c index 357ae726c..da5dd5826 100644 --- a/src/bin/csql/copy_options.c +++ b/src/bin/csql/copy_options.c @@ -16,7 +16,21 @@ #include "stringutils.h" -/* Concatenates "more" onto "var", and frees the original value of *var. */ +void +free_copy_options(copy_options * ptr) +{ + if (!ptr) + return; + free(ptr->before_tofrom); + free(ptr->after_tofrom); + free(ptr->file); + free(ptr->tableName); + free(ptr->columnList); + free(ptr); +} + + +/* concatenate "more" onto "var", freeing the original value of *var */ static void xstrcat(char **var, const char *more) { @@ -212,20 +226,6 @@ error: /* Frees copy options. */ -void -free_copy_options(copy_options * ptr) -{ - if (!ptr) - return; - free(ptr->before_tofrom); - free(ptr->after_tofrom); - free(ptr->file); - free(ptr->tableName); - free(ptr->columnList); - free(ptr); -} - - /* * ParseStageOptions takes the given copy options, parses the additional options * needed for the \stage command, and sets them in the copy options structure. diff --git a/src/bin/csql/copy_options.h b/src/bin/csql/copy_options.h index 07a3aeb09..4a2e15222 100644 --- a/src/bin/csql/copy_options.h +++ b/src/bin/csql/copy_options.h @@ -46,7 +46,7 @@ typedef struct copy_options bool psql_inout; /* true = use psql stdin/stdout */ bool from; /* true = FROM, false = TO */ - char *tableName; /* table name to stage data to */ + char *tableName; /* table name to stage data to */ char *columnList; /* optional column list used in staging */ } copy_options;