Skip to content

Commit d5ea5c2

Browse files
authored
Merge pull request #6092 from SimonThalvorsen/master
Remove maxArg from syntax-description in cases where it is unbound
2 parents 455f629 + f93c8e3 commit d5ea5c2

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

libpromises/syntax.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1293,9 +1293,12 @@ static JsonElement *FnCallTypeToJson(const FnCallType *fn_syntax)
12931293
JsonObjectAppendArray(json_fn, "parameters", params);
12941294
}
12951295

1296-
if (!(fn_syntax->argc.min == -1 && fn_syntax->argc.max == -1))
1296+
if (fn_syntax->argc.min != -1)
12971297
{
12981298
JsonObjectAppendInteger(json_fn, "minArgs", fn_syntax->argc.min);
1299+
}
1300+
if (fn_syntax->argc.max != -1)
1301+
{
12991302
JsonObjectAppendInteger(json_fn, "maxArgs", fn_syntax->argc.max);
13001303
}
13011304

0 commit comments

Comments
 (0)