From 2e8ce8c5ecb6d1f1c8f0af244d9f9b75dc6050ea Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Wed, 6 Feb 2013 14:54:53 +0100 Subject: Fix various clang analyzer warnings * Add annotations to our precondition functions so that they don't make the analyzer complain --- tools/extract.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tools/extract.c') 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); -- cgit v1.1