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:
parent
34ee70a6a0
commit
59e758846f
|
@ -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++) {
|
||||
|
|
Loading…
Reference in New Issue