Skip to content

Commit

Permalink
clang-format
Browse files Browse the repository at this point in the history
Change-Id: I457bc8f0e1580507926bde55ef4ce42a14f5517e
  • Loading branch information
Fᴀʙɪᴇɴ Wᴇʀɴʟɪ committed Jun 24, 2019
1 parent 36dbd14 commit a894a10
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/barometer.c
Expand Up @@ -1310,7 +1310,7 @@ static int collectd_barometer_config(const char *key, const char *value) {
int normalize_tmp = atoi(value);
if (normalize_tmp < 0 || normalize_tmp > 2) {
ERROR("barometer: collectd_barometer_config: invalid normalization: %d",
normalize_tmp);
normalize_tmp);
return 1;
}
config_normalize = normalize_tmp;
Expand Down
16 changes: 8 additions & 8 deletions src/daemon/configfile.c
Expand Up @@ -413,10 +413,11 @@ static int dispatch_block_plugin(oconfig_item_t *ci) {
/* Hm, no complex plugin found. Dispatch the values one by one */
for (int i = 0, ret = 0; i < ci->children_num; i++) {
if (ci->children[i].children == NULL) {
oconfig_item_t *child = ci -> children + i;
oconfig_item_t *child = ci->children + i;
ret = dispatch_value_plugin(name, child);
if (ret != 0) {
ERROR("Plugin %s failed to handle option %s, return code: %i", name, child -> key, ret);
ERROR("Plugin %s failed to handle option %s, return code: %i", name,
child->key, ret);
return ret;
}
} else {
Expand Down Expand Up @@ -478,9 +479,9 @@ static int cf_ci_replace_child(oconfig_item_t *dst, oconfig_item_t *src,
return 0;
}

temp = realloc(dst->children,
sizeof(oconfig_item_t) *
(dst->children_num + src->children_num - 1));
temp =
realloc(dst->children, sizeof(oconfig_item_t) *
(dst->children_num + src->children_num - 1));
if (temp == NULL) {
ERROR("configfile: realloc failed.");
return -1;
Expand Down Expand Up @@ -519,9 +520,8 @@ static int cf_ci_append_children(oconfig_item_t *dst, oconfig_item_t *src) {
if ((src == NULL) || (src->children_num == 0))
return 0;

temp =
realloc(dst->children,
sizeof(oconfig_item_t) * (dst->children_num + src->children_num));
temp = realloc(dst->children, sizeof(oconfig_item_t) *
(dst->children_num + src->children_num));
if (temp == NULL) {
ERROR("configfile: realloc failed.");
return -1;
Expand Down
13 changes: 6 additions & 7 deletions src/openvpn.c
Expand Up @@ -500,16 +500,15 @@ static int openvpn_config(const char *key, const char *value) {
/* group = */ "openvpn",
/* name = */ callback_name,
/* callback = */ openvpn_read,
/* interval = */ 0,
&(user_data_t){
.data = instance, .free_func = openvpn_free,
});
/* interval = */ 0, &(user_data_t){
.data = instance, .free_func = openvpn_free,
});

if (status == EINVAL) {
ERROR("openvpn plugin: status filename \"%s\" "
"already used, please choose a "
"different one.",
status_name);
"already used, please choose a "
"different one.",
status_name);
return -1;
}

Expand Down
2 changes: 1 addition & 1 deletion src/syslog.c
Expand Up @@ -57,7 +57,7 @@ static int sl_config(const char *key, const char *value) {
notif_severity = parse_notif_severity(value);
if (notif_severity < 0)
ERROR("syslog: invalid notification severity [%s]", value);
return 1;
return 1;
}

return 0;
Expand Down

0 comments on commit a894a10

Please sign in to comment.