if (flags & CS_DUMP_SHOW_DEFAULTS)
{
const struct ConfigSetType *cst = cs_get_type_def(cs, he->type);
- printf("# %s %s %s\n", cst->name, name, value->data);
+ if (cst)
+ printf("# %s %s %s\n", cst->name, name, value->data);
}
}
if ((type == DT_SYNONYM) && !(flags & CS_DUMP_SHOW_SYNONYMS))
continue;
- if ((type == DT_DISABLED) && !(flags & CS_DUMP_SHOW_DISABLED))
- continue;
+ // if ((type == DT_DISABLED) && !(flags & CS_DUMP_SHOW_DISABLED))
+ // continue;
if (type != DT_SYNONYM)
{
return CSR_ERR_INVALID | CSR_INV_TYPE;
}
- if ((num < LONG_MIN) || (num > LONG_MAX))
- {
- mutt_buffer_printf(err, "Long is too big: %s", value);
- return CSR_ERR_INVALID | CSR_INV_TYPE;
- }
-
if ((num < 0) && (cdef->type & DT_NOT_NEGATIVE))
{
mutt_buffer_printf(err, "Option %s may not be negative", cdef->name);
if (!cs || !var || !cdef)
return CSR_ERR_CODE; /* LCOV_EXCL_LINE */
- if ((value < LONG_MIN) || (value > LONG_MAX))
- {
- mutt_buffer_printf(err, "Invalid long: %ld", value);
- return CSR_ERR_INVALID | CSR_INV_TYPE;
- }
-
if ((value < 0) && (cdef->type & DT_NOT_NEGATIVE))
{
mutt_buffer_printf(err, "Option %s may not be negative", cdef->name);
int rc = cdef->validator(cs, cdef, cdef->initial, err);
if (CSR_RESULT(rc) != CSR_SUCCESS)
- return rc | CSR_INV_VALIDATOR;
+ return (rc | CSR_INV_VALIDATOR);
}
*(short *) var = cdef->initial;
int num = 0;
if (mutt_str_atoi(value, &num) < 0)
{
- mutt_buffer_printf(err, "Invalid number: %s", NONULL(value));
+ mutt_buffer_printf(err, "Invalid number: %s", value);
return CSR_ERR_INVALID | CSR_INV_TYPE;
}
snprintf(line, sizeof(line), tests[t], commands[c], vars[v]);
printf("%-26s", line);
int rc = mutt_parse_rc_line(line, tmp, err);
- printf("%2d %s\n", rc, NONULL(err->data));
+ printf("%2d %s\n", rc, err->data);
}
printf("\n");
}