char **opts = ((char **)value_addr);
int remaining_space = CFG_MAX_SUBOPTS;
int enddefault = 0;
+ int r;
while (0 && *opts != NULL) {
if (*opts == END_DEFAULT)
enddefault = 1;
opts += 2;
}
- int r =
- argconfig_parse_subopt_string(optarg, opts,
- remaining_space);
+ r = argconfig_parse_subopt_string(optarg, opts,
+ remaining_space);
if (r == 2) {
fprintf(stderr,
"Error Parsing Sub-Options: Too many options!\n");
s->config_type == CFG_FILE_RP ||
s->config_type == CFG_FILE_WP) {
const char *fopts = "";
+ FILE *f;
if (s->config_type == CFG_FILE_A)
fopts = "a";
else if (s->config_type == CFG_FILE_R)
else if (s->config_type == CFG_FILE_WP)
fopts = "w+";
- FILE *f = fopen(optarg, fopts);
+ f = fopen(optarg, fopts);
if (f == NULL) {
fprintf(stderr, "Unable to open %s file: %s\n",
s->option, optarg);
{
char **o = options;
char *tmp;
+ size_t toklen;
if (!string || !strlen(string)) {
*(o++) = NULL;
tmp = calloc(strlen(string) + 2, 1);
strcpy(tmp, string);
- size_t toklen;
toklen = strcspn(tmp, "=");
if (!toklen) {