summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_fox.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_fox.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_fox.c')
-rw-r--r--sys/geom/geom_fox.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/geom/geom_fox.c b/sys/geom/geom_fox.c
index 2eef7cd..89f444b 100644
--- a/sys/geom/geom_fox.c
+++ b/sys/geom/geom_fox.c
@@ -373,7 +373,7 @@ g_fox_taste(struct g_class *mp, struct g_provider *pp, int flags __unused)
g_topology_unlock();
buf = g_read_data(cp, 0, sectorsize, &error);
g_topology_lock();
- if (buf == NULL || error != 0)
+ if (buf == NULL)
break;
if (memcmp(buf, FOX_MAGIC, strlen(FOX_MAGIC)))
break;
OpenPOWER on IntegriCloud