summaryrefslogtreecommitdiff
path: root/tools/extract.c
diff options
context:
space:
mode:
authorStef Walter <stefw@gnome.org>2013-02-06 14:54:53 +0100
committerStef Walter <stefw@gnome.org>2013-02-06 14:54:53 +0100
commit2e8ce8c5ecb6d1f1c8f0af244d9f9b75dc6050ea (patch)
treed2845092b66331b9bdc54dd619bb6291fb4cea75 /tools/extract.c
parent0c6517104d1306228c31e596b0df6a4fb5af4dd1 (diff)
Fix various clang analyzer warnings
* Add annotations to our precondition functions so that they don't make the analyzer complain
Diffstat (limited to 'tools/extract.c')
-rw-r--r--tools/extract.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/extract.c b/tools/extract.c
index abbb300..40a3911 100644
--- a/tools/extract.c
+++ b/tools/extract.c
@@ -238,6 +238,9 @@ limit_modules_if_necessary (CK_FUNCTION_LIST_PTR *modules,
/* Count the number of modules */
for (out = 0; modules[out] != NULL; out++);
+ if (out == 0)
+ return;
+
order = malloc (sizeof (*order) * out);
return_if_fail (order != NULL);