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)
This commit is contained in:
Colin Percival 2004-02-28 12:59:56 +00:00
parent 34ee70a6a0
commit 59e758846f
1 changed files with 1 additions and 1 deletions

View File

@ -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++) {