1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Fix final comma in arrays.

This commit is contained in:
Alasdair Kergon 2002-01-03 12:43:01 +00:00
parent 756668473c
commit 5671fce111

View File

@ -82,7 +82,6 @@ static void _out_with_comment(struct formatter *f, const char *comment,
white_space[i] = '\t';
white_space[i] = '\0';
fprintf(f->fp, white_space);
i = vfprintf(f->fp, fmt, ap);
if (comment) {
@ -184,8 +183,7 @@ static int _print_header(struct formatter *f, struct volume_group *vg)
_out(f,
"# This file was originally generated by the LVM2 library\n"
"# It is inadvisable for people to edit this by hand unless\n"
"# they know what they're doing.\n"
"# It is inadvisable to edit this file.\n"
"# Generated: %s\n", ctime(&t));
return 1;
}
@ -280,7 +278,7 @@ static int _print_pvs(struct formatter *f, struct volume_group *vg)
}
static int _print_segment(struct formatter *f, struct volume_group *vg,
int count, struct stripe_segment *seg, int last)
int count, struct stripe_segment *seg)
{
int s;
const char *name;
@ -307,7 +305,7 @@ static int _print_segment(struct formatter *f, struct volume_group *vg,
}
_out(f, "\"%s\", %u%s", name, seg->area[s].pe,
last ? "" : ",");
(s == seg->stripes - 1) ? "" : ",");
}
_dec_indent(f);
@ -362,8 +360,7 @@ static int _print_lvs(struct formatter *f, struct volume_group *vg)
list_iterate (segh, &lv->segments) {
seg = list_item(segh, struct stripe_segment);
if (!_print_segment(f, vg, seg_count++, seg,
(segh->n == &lv->segments))) {
if (!_print_segment(f, vg, seg_count++, seg)) {
stack;
return 0;
}