mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
cleanup: use char arrays.
This commit is contained in:
parent
2d6ef123a6
commit
3178cfc818
@ -453,7 +453,7 @@ static int _stats_parse_histogram_spec(struct dm_stats *dms,
|
|||||||
struct dm_stats_region *region,
|
struct dm_stats_region *region,
|
||||||
const char *histogram)
|
const char *histogram)
|
||||||
{
|
{
|
||||||
static const char *_valid_chars = "0123456789,";
|
static const char _valid_chars[] = "0123456789,";
|
||||||
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;
|
||||||
@ -740,8 +740,8 @@ static int _stats_parse_histogram(struct dm_pool *mem, char *hist_str,
|
|||||||
struct dm_histogram **histogram,
|
struct dm_histogram **histogram,
|
||||||
struct dm_stats_region *region)
|
struct dm_stats_region *region)
|
||||||
{
|
{
|
||||||
|
static const char _valid_chars[] = "0123456789:";
|
||||||
struct dm_histogram *bounds = region->bounds;
|
struct dm_histogram *bounds = region->bounds;
|
||||||
static const char *_valid_chars = "0123456789:";
|
|
||||||
struct dm_histogram hist = {
|
struct dm_histogram hist = {
|
||||||
.nr_bins = region->bounds->nr_bins
|
.nr_bins = region->bounds->nr_bins
|
||||||
};
|
};
|
||||||
@ -2000,7 +2000,7 @@ static struct dm_histogram *_alloc_dm_histogram(int nr_bins)
|
|||||||
*/
|
*/
|
||||||
struct dm_histogram *dm_histogram_bounds_from_string(const char *bounds_str)
|
struct dm_histogram *dm_histogram_bounds_from_string(const char *bounds_str)
|
||||||
{
|
{
|
||||||
static const char *_valid_chars = "0123456789,muns";
|
static const char _valid_chars[] = "0123456789,muns";
|
||||||
uint64_t this_val = 0, mult = 1;
|
uint64_t this_val = 0, mult = 1;
|
||||||
const char *c, *v, *val_start;
|
const char *c, *v, *val_start;
|
||||||
struct dm_histogram_bin *cur;
|
struct dm_histogram_bin *cur;
|
||||||
|
Loading…
Reference in New Issue
Block a user