commit | aea3f9f2d8b6ecf6b69df12ba4e99ca44d6813fb | [log] [tgz] |
---|---|---|
author | Thomas Haller <thaller@redhat.com> | Fri Dec 01 20:06:36 2023 +0100 |
committer | Thomas Haller <thaller@redhat.com> | Fri Dec 01 20:06:39 2023 +0100 |
tree | 57e1a5a459029e3d109c65c519ce7bf490c393b2 | |
parent | 57e0170607a9cb5bc94eb2b8472a7dd01bd610d6 [diff] |
lib: fix signed overflow warning in nl_object_diff() Coverity warns "Signed integer overflow for expression '1<<31'".
diff --git a/lib/object.c b/lib/object.c index 234628a..9b147d6 100644 --- a/lib/object.c +++ b/lib/object.c
@@ -399,7 +399,7 @@ diff = nl_object_diff64(a, b); return (diff & ~((uint64_t) 0xFFFFFFFF)) - ? (uint32_t) diff | (1 << 31) + ? (uint32_t) diff | (((uint32_t ) 1u) << 31) : (uint32_t) diff; }