mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
clean: use struct initializer
This commit is contained in:
parent
6db19f6b51
commit
a3dcdf5671
@ -812,9 +812,7 @@ static const char _mode_names[][8] = {
|
|||||||
*/
|
*/
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
struct filemap_monitor fm;
|
struct filemap_monitor fm = { 0 };
|
||||||
|
|
||||||
memset(&fm, 0, sizeof(fm));
|
|
||||||
|
|
||||||
if (!_parse_args(argc, argv, &fm)) {
|
if (!_parse_args(argc, argv, &fm)) {
|
||||||
free(fm.path);
|
free(fm.path);
|
||||||
|
@ -837,7 +837,7 @@ static int _stats_parse_histogram_spec(struct dm_stats *dms,
|
|||||||
uint64_t scale = region->timescale, this_val = 0;
|
uint64_t scale = region->timescale, this_val = 0;
|
||||||
struct dm_pool *mem = dms->hist_mem;
|
struct dm_pool *mem = dms->hist_mem;
|
||||||
struct dm_histogram_bin cur;
|
struct dm_histogram_bin cur;
|
||||||
struct dm_histogram hist;
|
struct dm_histogram hist = { 0 };
|
||||||
int nr_bins = 1;
|
int nr_bins = 1;
|
||||||
const char *c, *v, *val_start;
|
const char *c, *v, *val_start;
|
||||||
char *p, *endptr = NULL;
|
char *p, *endptr = NULL;
|
||||||
@ -857,8 +857,6 @@ static int _stats_parse_histogram_spec(struct dm_stats *dms,
|
|||||||
if (!dm_pool_begin_object(mem, sizeof(cur)))
|
if (!dm_pool_begin_object(mem, sizeof(cur)))
|
||||||
return_0;
|
return_0;
|
||||||
|
|
||||||
memset(&hist, 0, sizeof(hist));
|
|
||||||
|
|
||||||
hist.nr_bins = 0; /* fix later */
|
hist.nr_bins = 0; /* fix later */
|
||||||
hist.region = region;
|
hist.region = region;
|
||||||
hist.dms = dms;
|
hist.dms = dms;
|
||||||
|
Loading…
Reference in New Issue
Block a user