diff options
| author | Toomas Soome <tsoome@me.com> | 2019-01-26 19:38:10 +0200 |
|---|---|---|
| committer | Dan McDonald <danmcd@joyent.com> | 2019-02-04 13:39:11 -0500 |
| commit | 8d44205c2de6047b3104694e998664b7a1c527ab (patch) | |
| tree | 151a5a8aeacbe26b14c2ede3b233a4da6ebb926c /usr/src/cmd/addbadsec/ix_altsctr.c | |
| parent | de4cec4850ed6a4d4ee96e179e79e02a3d872ea3 (diff) | |
| download | illumos-joyent-8d44205c2de6047b3104694e998664b7a1c527ab.tar.gz | |
10311 addbadsec: NULL pointer errors
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Andy Stormont <astormont@racktopsystems.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/cmd/addbadsec/ix_altsctr.c')
| -rw-r--r-- | usr/src/cmd/addbadsec/ix_altsctr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr/src/cmd/addbadsec/ix_altsctr.c b/usr/src/cmd/addbadsec/ix_altsctr.c index 9907689d94..45471c8bb0 100644 --- a/usr/src/cmd/addbadsec/ix_altsctr.c +++ b/usr/src/cmd/addbadsec/ix_altsctr.c @@ -274,7 +274,7 @@ init_altsctr(void) ap->ap_tblp->alts_map_base = altsmap_alloc(ap->ap_tbl_secsiz / NBPSCTR, ap->part.p_size, ap->ap_map_sectot, ALTS_MAP_UP); - if (ap->ap_tblp->alts_map_base == NULL) { + if (ap->ap_tblp->alts_map_base == 0) { perror("Unable to allocate alternate map on disk: "); exit(57); } @@ -482,7 +482,7 @@ gen_alts_ent(void) altsmap_alloc(ap->ap_tblp->alts_map_base + ap->ap_map_sectot, ap->part.p_size, ap->ap_ent_secsiz / NBPSCTR, ALTS_MAP_UP); - if (ap->ap_tblp->alts_ent_base == NULL) { + if (ap->ap_tblp->alts_ent_base == 0) { perror("Unable to allocate alternate entry table on disk: "); exit(65); } @@ -512,7 +512,7 @@ assign_altsctr(void) alts_ind = altsmap_alloc(ap->part.p_size-1, ap->ap_tblp->alts_map_base + ap->ap_map_sectot - 1, cluster, ALTS_MAP_DOWN); - if (alts_ind == NULL) { + if (alts_ind == 0) { (void) fprintf(stderr, "Unable to allocate alternates for bad starting" " sector %u.\n", (ap->ap_entp)[i].bad_start); |
