Skip to content

Commit

Permalink
format: apply bareos-checks-sources changes
Browse files Browse the repository at this point in the history
  • Loading branch information
pstorz committed Dec 1, 2022
1 parent d321e93 commit eeb0a48
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
16 changes: 4 additions & 12 deletions core/src/dird/dird_conf.cc
Expand Up @@ -1058,9 +1058,7 @@ static void PropagateResource(ResourceItem* items,
*new_list = new alist<const char*>(10, owned_by_alist);
}

foreach_alist (str, orig_list) {
(*new_list)->append(strdup(str));
}
foreach_alist (str, orig_list) { (*new_list)->append(strdup(str)); }

SetBit(i, dest->item_present_);
SetBit(i, dest->inherit_content_);
Expand All @@ -1082,9 +1080,7 @@ static void PropagateResource(ResourceItem* items,
*new_list = new alist<BareosResource*>(10, not_owned_by_alist);
}

foreach_alist (res, orig_list) {
(*new_list)->append(res);
}
foreach_alist (res, orig_list) { (*new_list)->append(res); }

SetBit(i, dest->item_present_);
SetBit(i, dest->inherit_content_);
Expand All @@ -1108,9 +1104,7 @@ static void PropagateResource(ResourceItem* items,
*new_list = new alist<const char*>(10, owned_by_alist);
}

foreach_alist (str, orig_list) {
(*new_list)->append(strdup(str));
}
foreach_alist (str, orig_list) { (*new_list)->append(strdup(str)); }

SetBit(i, dest->item_present_);
SetBit(i, dest->inherit_content_);
Expand Down Expand Up @@ -2478,9 +2472,7 @@ static bool PopulateJobdefaults()
bool retval = true;

// Propagate the content of a JobDefs to another.
foreach_res (jobdefs, R_JOBDEFS) {
PropagateJobdefs(R_JOBDEFS, jobdefs);
}
foreach_res (jobdefs, R_JOBDEFS) { PropagateJobdefs(R_JOBDEFS, jobdefs); }

// Propagate the content of the JobDefs to the actual Job.
foreach_res (job, R_JOB) {
Expand Down
4 changes: 1 addition & 3 deletions core/src/stored/stored_conf.cc
Expand Up @@ -803,9 +803,7 @@ static bool SaveResource(int type, ResourceItem* items, int pass)
p->device_resources = res_changer->device_resources;

DeviceResource* q = nullptr;
foreach_alist (q, p->device_resources) {
q->changer_res = p;
}
foreach_alist (q, p->device_resources) { q->changer_res = p; }

int errstat;
if ((errstat = RwlInit(&p->changer_lock, PRIO_SD_ACH_ACCESS)) != 0) {
Expand Down

0 comments on commit eeb0a48

Please sign in to comment.