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 14, 2024
1 parent 20c8bdd commit a0d8122
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 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 Expand Up @@ -275,7 +275,7 @@ spl_vmem_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 @@ -294,7 +294,7 @@ spl_vmem_zalloc(size_t sz, int fl, const char *func, int line)
(void) func;
(void) line;

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

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

0 comments on commit a0d8122

Please sign in to comment.