summaryrefslogtreecommitdiff
path: root/sys/src/9/port/devsd.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2019-04-16 16:25:33 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2019-04-16 16:25:33 +0200
commitb44440bd165bdaa8c5764eead3fc54cadab7334f (patch)
treee973bb6796965aed4ca90a5f133bba7726ce43ce /sys/src/9/port/devsd.c
parent7c33bdd2d31ade66cbf0ad4531fdbeda1d6cbba5 (diff)
devsd: fix sddelpart() AGAIN
the previous "fix" missed to advance pp so after we hit a invalid partition all following partitions would be ignored.
Diffstat (limited to 'sys/src/9/port/devsd.c')
-rw-r--r--sys/src/9/port/devsd.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/src/9/port/devsd.c b/sys/src/9/port/devsd.c
index d21106f19..09f885660 100644
--- a/sys/src/9/port/devsd.c
+++ b/sys/src/9/port/devsd.c
@@ -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++;
}