Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Jul 19, 2015
1 parent b841f30 commit e244401
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/main/conffile.c
Original file line number Diff line number Diff line change
Expand Up @@ -1370,7 +1370,7 @@ static inline int fr_item_validate_ipaddr(CONF_SECTION *cs, char const *name, PW
* @param type Data type to parse #CONF_PAIR value as.
* Should be one of the following ``data`` types, and one or more of the following ``flag`` types or'd together:
* - ``data`` #PW_TYPE_TMPL - @copybrief PW_TYPE_TMPL
Feeds the value into #tmpl_afrom_str. Value can be
* Feeds the value into #tmpl_afrom_str. Value can be
* obtained when processing requests, with #tmpl_expand or #tmpl_aexpand.
* - ``data`` #PW_TYPE_BOOLEAN - @copybrief PW_TYPE_BOOLEAN
* - ``data`` #PW_TYPE_INTEGER - @copybrief PW_TYPE_INTEGER
Expand All @@ -1383,7 +1383,7 @@ static inline int fr_item_validate_ipaddr(CONF_SECTION *cs, char const *name, PW
* - ``data`` #PW_TYPE_IPV6_ADDR - @copybrief PW_TYPE_IPV6_ADDR (IPv6 address with prefix 128).
* - ``data`` #PW_TYPE_IPV6_PREFIX - @copybrief PW_TYPE_IPV6_PREFIX (IPv6 address with variable prefix).
* - ``data`` #PW_TYPE_COMBO_IP_ADDR - @copybrief PW_TYPE_COMBO_IP_ADDR (IPv4/IPv6 address with
prefix 32/128).
* prefix 32/128).
* - ``data`` #PW_TYPE_COMBO_IP_PREFIX - @copybrief PW_TYPE_COMBO_IP_PREFIX (IPv4/IPv6 address with
* variable prefix).
* - ``data`` #PW_TYPE_TIMEVAL - @copybrief PW_TYPE_TIMEVAL
Expand Down Expand Up @@ -1430,7 +1430,7 @@ int cf_item_parse(CONF_SECTION *cs, char const *name, unsigned int type, void *d
* Everything except templates must have a base type.
*/
if (!(type & 0xff) && !tmpl) {
cf_log_err(c_item, "Configuration item '%s' must have a data type", name);
cf_log_err(c_item, "Configuration item \"%s\" must have a data type", name);
return -1;
}

Expand Down Expand Up @@ -1476,7 +1476,7 @@ int cf_item_parse(CONF_SECTION *cs, char const *name, unsigned int type, void *d
if (!value) {
if (required) {
is_required:
cf_log_err(c_item, "Configuration item '%s' must have a value", name);
cf_log_err(c_item, "Configuration item \"%s\" must have a value", name);

return -1;
}
Expand All @@ -1485,10 +1485,8 @@ int cf_item_parse(CONF_SECTION *cs, char const *name, unsigned int type, void *d

if ((value[0] == '\0') && cant_be_empty) {
cant_be_empty:
cf_log_err(c_item, "Configuration item '%s' must not be empty (zero length)", name);

if (!required)
cf_log_err(c_item, "Comment item to silence this message");
cf_log_err(c_item, "Configuration item \"%s\" must not be empty (zero length)", name);
if (!required) cf_log_err(c_item, "Comment item to silence this message");

return -1;
}
Expand Down

0 comments on commit e244401

Please sign in to comment.