mirror of https://gitee.com/bigwinds/arangodb
added variables
This commit is contained in:
parent
c6993c681b
commit
eed8ceebd1
|
@ -147,15 +147,18 @@ typedef struct po_visit_functions_s {
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
static char * FillVariables (const char* value) {
|
static char * FillVariables (const char* value) {
|
||||||
|
TRI_string_buffer_t buffer;
|
||||||
|
|
||||||
|
const char* p;
|
||||||
|
const char* e;
|
||||||
|
const char* q;
|
||||||
|
|
||||||
if (value == NULL) {
|
if (value == NULL) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
TRI_string_buffer_t buffer;
|
p = value;
|
||||||
|
e = p + strlen(value);
|
||||||
const char* p = value;
|
|
||||||
const char* e = p + strlen(value);
|
|
||||||
const char* q;
|
|
||||||
|
|
||||||
TRI_InitSizedStringBuffer(&buffer, TRI_CORE_MEM_ZONE, strlen(value) + 1);
|
TRI_InitSizedStringBuffer(&buffer, TRI_CORE_MEM_ZONE, strlen(value) + 1);
|
||||||
|
|
||||||
|
@ -1453,8 +1456,11 @@ bool TRI_ParseArgumentsProgramOptions (TRI_program_options_t * options,
|
||||||
|
|
||||||
t = FillVariables(optarg);
|
t = FillVariables(optarg);
|
||||||
item->parse(t, item->_desc);
|
item->parse(t, item->_desc);
|
||||||
|
|
||||||
|
if (t != NULL) {
|
||||||
TRI_FreeString(TRI_CORE_MEM_ZONE, t);
|
TRI_FreeString(TRI_CORE_MEM_ZONE, t);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
TRI_AnnihilateStringBuffer(&buffer);
|
TRI_AnnihilateStringBuffer(&buffer);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue