libfdisk: use skip_blank() in scripts

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2014-10-08 13:11:59 +02:00
parent 8be199ea2b
commit 0a9ac4d2f5
1 changed files with 2 additions and 3 deletions

View File

@ -593,6 +593,7 @@ static int parse_script_line(struct fdisk_script *dp, char *s)
while (rc == 0 && p && *p) {
DBG(SCRIPT, ul_debugobj(dp, " parsing '%s'", p));
p = (char *) skip_blank(p);
if (!strncasecmp(p, "start=", 6)) {
p += 6;
@ -741,9 +742,7 @@ static int parse_commas_line(struct fdisk_script *dp, char *s)
uint64_t num;
char *begin;
while (isblank(*p)) p++;
if (!*p)
break;
p = (char *) skip_blank(p);
item++;
DBG(SCRIPT, ul_debugobj(dp, " parsing item %d ('%s')", item, p));