mirror of
https://git.code.sf.net/p/ngspice/ngspice
synced 2026-08-22 13:57:32 +02:00
frontend/define.c, ntharg(), #11/15 `args' can't be NULL here
This commit is contained in:
@@ -412,11 +412,11 @@ ntharg(int num, struct pnode *args)
|
||||
if (!args)
|
||||
return NULL;
|
||||
if (--num <= 0) {
|
||||
if (args && args->pn_op && (args->pn_op->op_num == PT_OP_COMMA))
|
||||
if (args->pn_op && (args->pn_op->op_num == PT_OP_COMMA))
|
||||
return args->pn_left;
|
||||
return args;
|
||||
}
|
||||
if (args && args->pn_op && (args->pn_op->op_num != PT_OP_COMMA)) {
|
||||
if (args->pn_op && (args->pn_op->op_num != PT_OP_COMMA)) {
|
||||
if (num <= 1)
|
||||
return args;
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user