diff options
author | cperciva <cperciva@FreeBSD.org> | 2004-02-28 12:59:56 +0000 |
---|---|---|
committer | cperciva <cperciva@FreeBSD.org> | 2004-02-28 12:59:56 +0000 |
commit | 6d4fbf512992510aa303f3207a2e143ca5d03393 (patch) | |
tree | a68430f63e8c91d5404585441fd23b61bb72810f /sys/cam | |
parent | c842ac8be9fd95ec52b54b0d5a85bd89461be83a (diff) | |
download | FreeBSD-src-6d4fbf512992510aa303f3207a2e143ca5d03393.zip FreeBSD-src-6d4fbf512992510aa303f3207a2e143ca5d03393.tar.gz |
Compare the *number* of patterns to zero, not the *pointer* to the
patterns. (These lines are correct the other two times they appear.)
Reported by: "Ted Unangst" <tedu@coverity.com>
Approved by: rwatson (mentor), ken (scsi)
Diffstat (limited to 'sys/cam')
-rw-r--r-- | sys/cam/cam_xpt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index 7e3bfce..3cd6a8b 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -1882,7 +1882,7 @@ xptdevicematch(struct dev_match_pattern *patterns, u_int num_patterns, * If there are no match entries, then this device matches no * matter what. */ - if ((patterns == NULL) || (patterns == 0)) + if ((patterns == NULL) || (num_patterns == 0)) return(DM_RET_DESCEND | DM_RET_COPY); for (i = 0; i < num_patterns; i++) { |