summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_sunlabel.c
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2005-11-30 19:24:51 +0000
committersobomax <sobomax@FreeBSD.org>2005-11-30 19:24:51 +0000
commit29543921eae6a40180f2f784021ed1b42d328e2a (patch)
tree81ef73354089000f24e964c7cdffc0035dfe7d01 /sys/geom/geom_sunlabel.c
parent937b629bd5f0ccf20166962cb9ec63905573b02c (diff)
downloadFreeBSD-src-29543921eae6a40180f2f784021ed1b42d328e2a.zip
FreeBSD-src-29543921eae6a40180f2f784021ed1b42d328e2a.tar.gz
Check for g_read_data(9) errors properly:
o The only indication of error condition is NULL value returned by the function; o value pointed to by error argument is undefined in the case when operation completes successfully. Discussed with: phk
Diffstat (limited to 'sys/geom/geom_sunlabel.c')
-rw-r--r--sys/geom/geom_sunlabel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/geom/geom_sunlabel.c b/sys/geom/geom_sunlabel.c
index 4c453cd..06e3bbd7 100644
--- a/sys/geom/geom_sunlabel.c
+++ b/sys/geom/geom_sunlabel.c
@@ -278,7 +278,7 @@ g_sunlabel_taste(struct g_class *mp, struct g_provider *pp, int flags)
g_topology_unlock();
buf = g_read_data(cp, 0, ms->sectorsize, &error);
g_topology_lock();
- if (buf == NULL || error != 0)
+ if (buf == NULL)
break;
/*
OpenPOWER on IntegriCloud