eliminate apparently dead code, and coverity warning.

This commit is contained in:
Enno Rehling 2018-09-10 18:17:34 +02:00
parent b2c2942c60
commit 12fd6435c5
1 changed files with 1 additions and 7 deletions

View File

@ -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);