devsd: fix sddelpart() AGAIN

the previous "fix" missed to advance pp so after
we hit a invalid partition all following partitions
would be ignored.
front
cinap_lenrek 2019-04-16 16:25:33 +02:00
parent 7c33bdd2d3
commit b44440bd16
1 changed files with 1 additions and 3 deletions

View File

@ -154,9 +154,7 @@ sddelpart(SDunit* unit, char* name)
*/
pp = unit->part;
for(i = 0; i < unit->npart; i++){
if(!pp->valid)
continue;
if(strcmp(name, pp->name) == 0)
if(pp->valid && strcmp(name, pp->name) == 0)
break;
pp++;
}