From f45bc88b3d267d2aa92c5bc0233f727948ac5409 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Wed, 23 Oct 2013 15:40:27 +0100 Subject: Fix Coverity #1109867. --- content/content.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'content/content.c') diff --git a/content/content.c b/content/content.c index 186c5bee8..47fda92ad 100644 --- a/content/content.c +++ b/content/content.c @@ -657,7 +657,9 @@ uint32_t content_count_users(struct content *c) for (user = c->user_list; user != NULL; user = user->next) counter += 1; - + + assert(counter > 0); + return counter - 1; /* Subtract 1 for the sentinel */ } -- cgit v1.2.3