Skip to content

Commit

Permalink
Coverity model should know that KM_NOSLEEP means no sleeping
Browse files Browse the repository at this point in the history
This fixes an old oversight. I doubt it affected the accuracy of
coverity very much, but it is an improvement that I caught while
discussing the latest coverity results with Rob N.

Signed-off-by: Richard Yao <[email protected]>
  • Loading branch information
ryao committed Jun 13, 2024
1 parent 20c8bdd commit a57bb91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contrib/coverity/model.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ spl_kmem_alloc(size_t sz, int fl, const char *func, int line)

__coverity_negative_sink__(sz);

if (condition1)
if (((fl & KM_NOSLEEP) != KM_NOSLEEP) || condition1)
__coverity_sleep__();

if (((fl & KM_NOSLEEP) != KM_NOSLEEP) || condition0) {
Expand All @@ -193,7 +193,7 @@ spl_kmem_zalloc(size_t sz, int fl, const char *func, int line)

__coverity_negative_sink__(sz);

if (condition1)
if (((fl & KM_NOSLEEP) != KM_NOSLEEP) || condition1)
__coverity_sleep__();

if (((fl & KM_NOSLEEP) != KM_NOSLEEP) || condition0) {
Expand Down

0 comments on commit a57bb91

Please sign in to comment.