diff options
Diffstat (limited to 'sbin/disklabel/disklabel.c')
-rw-r--r-- | sbin/disklabel/disklabel.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/disklabel/disklabel.c b/sbin/disklabel/disklabel.c index d29763c..dad7cc6 100644 --- a/sbin/disklabel/disklabel.c +++ b/sbin/disklabel/disklabel.c @@ -958,8 +958,10 @@ getasciilabel(FILE *f, struct disklabel *lp) for (; cpp < &dktypenames[DKMAXTYPES]; cpp++) if (*cpp && streq(*cpp, tp)) { lp->d_type = cpp - dktypenames; - continue; + break; } + if (cpp < &dktypenames[DKMAXTYPES]) + continue; v = atoi(tp); if ((unsigned)v >= DKMAXTYPES) fprintf(stderr, "line %d:%s %d\n", lineno, |