forked from github/server
eliminate apparently dead code, and coverity warning.
This commit is contained in:
parent
b2c2942c60
commit
12fd6435c5
1 changed files with 1 additions and 7 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue