summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authordanh-arm <dan.handley@arm.com>2016-07-28 09:25:40 +0100
committerGitHub <noreply@github.com>2016-07-28 09:25:40 +0100
commit578b3ad72454690a5d46d8c1a5ba9893e557b4ca (patch)
tree575b80bdca57a362ef2c7ff3b6a3ec994cf012ab /common
parent63ad1ef4f82c1d4b676d984a98c0972a41011246 (diff)
parent5e5e41625ee4b9cc2aa9117c6764e42cdcf84eb0 (diff)
Merge pull request #673 from soby-mathew/sm/coverity_issue
Improve debug assertion for runtime svc number
Diffstat (limited to 'common')
-rw-r--r--common/runtime_svc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/runtime_svc.c b/common/runtime_svc.c
index 7a5855b6..b8af6cd8 100644
--- a/common/runtime_svc.c
+++ b/common/runtime_svc.c
@@ -87,7 +87,8 @@ void runtime_svc_init(void)
int rc = 0, index, start_idx, end_idx;
/* Assert the number of descriptors detected are less than maximum indices */
- assert((RT_SVC_DECS_NUM >= 0) && (RT_SVC_DECS_NUM < MAX_RT_SVCS));
+ assert((RT_SVC_DESCS_END >= RT_SVC_DESCS_START) &&
+ (RT_SVC_DECS_NUM < MAX_RT_SVCS));
/* If no runtime services are implemented then simply bail out */
if (RT_SVC_DECS_NUM == 0)