diff --git a/libdm/libdm-targets.c b/libdm/libdm-targets.c index fd74336aa..8a8a328d1 100644 --- a/libdm/libdm-targets.c +++ b/libdm/libdm-targets.c @@ -54,6 +54,18 @@ int dm_get_status_snapshot(struct dm_pool *mem, const char *params, return 1; } +/* + * Skip nr fields each delimited by a single space. + * FIXME Don't assume single space. + */ +static const char *_skip_fields(const char *p, unsigned nr) +{ + while (p && nr-- && (p = strchr(p, ' '))) + p++; + + return p; +} + /* * Various RAID status versions include: * Versions < 1.5.0 (4 fields): @@ -132,17 +144,6 @@ bad: return 0; } -/* - * Skip nr fields delimited by a single space. - */ -static const char *_skip_fields(const char *p, unsigned nr) -{ - while (p && nr-- && (p = strchr(p, ' '))) - p++; - - return p; -} - /* * <#used metadata blocks>/<#total metadata blocks> * <#used cache blocks>/<#total cache blocks>