diff options
author | Maciej Żenczykowski <maze@google.com> | 2023-12-05 11:00:16 +0000 |
---|---|---|
committer | Maciej Żenczykowski <maze@google.com> | 2023-12-05 11:00:16 +0000 |
commit | 716a56c587afa0edc65faa371fb9baf8a42a6c24 (patch) | |
tree | 389ce9d730d5a88ebfe9156c9eeb9bd2e9af14e6 | |
parent | 22d2d8295b47f750069eae6ef303213e91ec3b07 (diff) | |
download | apf-716a56c587afa0edc65faa371fb9baf8a42a6c24.tar.gz |
apf v5: remove spurious check for >=0 of unsigned value.
apf_interpreter.c:107:38: error: comparison of unsigned expression in '>= 0' is always true [-Werror=type-limits]
107 | (p) >= 0 && \
| ^~
Bug: 293694479
Change-Id: I7c86756722238f7f67ebbc92b26ed17d041e29bb
Test: N/A
Signed-off-by: Maciej Żenczykowski <maze@google.com>
-rw-r--r-- | v5/apf_interpreter.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/v5/apf_interpreter.c b/v5/apf_interpreter.c index dd1c620..9c6175d 100644 --- a/v5/apf_interpreter.c +++ b/v5/apf_interpreter.c @@ -104,7 +104,6 @@ int apf_run(uint8_t* const program, const uint32_t program_len, #define IN_OUTPUT_BOUNDS(p, size) (ENFORCE_UNSIGNED(p) && \ ENFORCE_UNSIGNED(size) && \ (p) + (size) <= allocate_buffer_len && \ - (p) >= 0 && \ (p) + (size) >= (p)) // Accept packet if not write within allocated output buffer #define ASSERT_IN_OUTPUT_BOUNDS(p, size) ASSERT_RETURN(IN_OUTPUT_BOUNDS(p, size)) |