1
0
Fork 0

added variables

This commit is contained in:
Frank Celler 2013-10-27 12:26:10 +01:00
parent c6993c681b
commit eed8ceebd1
1 changed files with 12 additions and 6 deletions

View File

@ -147,15 +147,18 @@ typedef struct po_visit_functions_s {
////////////////////////////////////////////////////////////////////////////////
static char * FillVariables (const char* value) {
TRI_string_buffer_t buffer;
const char* p;
const char* e;
const char* q;
if (value == NULL) {
return NULL;
}
TRI_string_buffer_t buffer;
const char* p = value;
const char* e = p + strlen(value);
const char* q;
p = value;
e = p + strlen(value);
TRI_InitSizedStringBuffer(&buffer, TRI_CORE_MEM_ZONE, strlen(value) + 1);
@ -1453,7 +1456,10 @@ bool TRI_ParseArgumentsProgramOptions (TRI_program_options_t * options,
t = FillVariables(optarg);
item->parse(t, item->_desc);
TRI_FreeString(TRI_CORE_MEM_ZONE, t);
if (t != NULL) {
TRI_FreeString(TRI_CORE_MEM_ZONE, t);
}
}
TRI_AnnihilateStringBuffer(&buffer);