From cf393466976a226faba924c6d14fa04bd7b37c89 Mon Sep 17 00:00:00 2001 From: Alasdair G Kergon Date: Tue, 22 Mar 2016 19:27:34 +0000 Subject: [PATCH] libdm: Move _skip_fields within file. --- libdm/libdm-targets.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) 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>