From 12fd6435c5346b8d8edd12125a32affe64895140 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Mon, 10 Sep 2018 18:17:34 +0200 Subject: [PATCH] eliminate apparently dead code, and coverity warning. --- src/util/message.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/util/message.c b/src/util/message.c index 8915dca8f..d8c66f5e0 100644 --- a/src/util/message.c +++ b/src/util/message.c @@ -86,13 +86,7 @@ static void mt_register(message_type * mtype) { message_type *mt_create(message_type * mtype, const char *args[], int nparameters) { - if (args != NULL && args[nparameters]) { - /* count the number of parameters */ - do { - ++nparameters; - } while (args[nparameters]); - } - if (nparameters > 0) { + if (args && nparameters > 0) { int i; mtype->nparameters = nparameters; mtype->pnames = (char **)malloc(sizeof(char *) * nparameters);