diff options
author | Olivier Deprez <olivier.deprez@arm.com> | 2020-01-06 15:45:22 +0100 |
---|---|---|
committer | Olivier Deprez <olivier.deprez@arm.com> | 2020-02-04 13:40:30 +0000 |
commit | 47939f67252edc6295268dfebff24b5450eaba85 (patch) | |
tree | c0400a12f62eedac5367b900c3a4dd60e661fd2e /lib/debugfs | |
parent | 4ad18e5df39ba69418cd8c638f92bdcc75a6129d (diff) | |
download | trusted-firmware-a-47939f67252edc6295268dfebff24b5450eaba85.tar.gz |
coverity: debugfs devfip remove comparisons to LONG_MAX
CID 353228: Integer handling issues (CONSTANT_EXPRESSION_RESULT)
The checks on size and offset_address in get_entry always resolve to
false provided those fields are long long int and cannot be greater
than LONG_MAX.
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: I0fac485a39ac4a40ae8c0d25a706ad74c795e130
Diffstat (limited to 'lib/debugfs')
-rw-r--r-- | lib/debugfs/devfip.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/debugfs/devfip.c b/lib/debugfs/devfip.c index 5581b219fa..fc14e707ec 100644 --- a/lib/debugfs/devfip.c +++ b/lib/debugfs/devfip.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Arm Limited. All rights reserved. + * Copyright (c) 2019-2020, Arm Limited. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -103,10 +103,6 @@ static int get_entry(chan_t *c, struct fip_entry *entry) return -1; } - if ((entry->size > LONG_MAX) || (entry->offset_address > LONG_MAX)) { - return -1; - } - if (entry->size == 0) { return 0; } |