diff --git a/src/las.c b/src/las.c index ecc0438d2551db0b9c56d699a77259049643be35..18929a432a0ebe83be807510d5b96e64b81865bc 100644 --- a/src/las.c +++ b/src/las.c @@ -3590,8 +3590,7 @@ void fix_type_field(node *n) /* Too few arguments or similar. */ copy_pike_type(n->type, mixed_type_string); - if ((s = get_first_arg_type(dmalloc_touch(struct pike_type *, f), 0)) || - (s = get_first_arg_type(dmalloc_touch(struct pike_type *, f), + if ((s = get_first_arg_type(dmalloc_touch(struct pike_type *, f), CALL_NOT_LAST_ARG))) { yytype_report(REPORT_ERROR, NULL, 0, s, NULL, 0, NULL, @@ -4199,8 +4198,7 @@ void fix_type_field(node *n) if (sscanf_type) { if (!(n->type = new_get_return_type(sscanf_type, 0))) { struct pike_type *expected; - if ((expected = get_first_arg_type(sscanf_type, 0)) || - (expected = get_first_arg_type(sscanf_type, CALL_NOT_LAST_ARG))) { + if ((expected = get_first_arg_type(sscanf_type, CALL_NOT_LAST_ARG))) { yytype_report(REPORT_ERROR, NULL, 0, expected, NULL, 0, NULL, diff --git a/src/pike_types.c b/src/pike_types.c index dc7a25041055e2ab59ffbfc62a2b918bfe553a4a..93060633a7bfaaad14eabb8ace662f698683818b 100644 --- a/src/pike_types.c +++ b/src/pike_types.c @@ -61,6 +61,8 @@ /* * Flags used by low_get_first_arg_type() + * + * Note that these differ for the flags to get_first_arg_type(). */ #define FILTER_KEEP_VOID 1 /* Keep void during the filtering. */ @@ -5212,7 +5214,7 @@ static struct pike_type *debug_low_key_type(struct pike_type *t, node *n) { /* Get the type of the first argument of the function. */ struct pike_type *res = - get_first_arg_type(ID_FROM_INT(p, i)->type, 0); + get_first_arg_type(ID_FROM_INT(p, i)->type, CALL_NOT_LAST_ARG); if (res) return res; /* FIXME: Warn? */ add_ref(string_type_string); @@ -5225,7 +5227,7 @@ static struct pike_type *debug_low_key_type(struct pike_type *t, node *n) { /* Get the type of the first argument of the function. */ struct pike_type *res = - get_first_arg_type(ID_FROM_INT(p, i)->type, 0); + get_first_arg_type(ID_FROM_INT(p, i)->type, CALL_NOT_LAST_ARG); if (res) return res; /* FIXME: Warn? */ add_ref(mixed_type_string); diff --git a/src/pike_types.h b/src/pike_types.h index 8ed036d034af31db1a226bccc81544bed44b0801..005e8b1c62560eabc0c20c8c87f8dbfe86d00eed 100644 --- a/src/pike_types.h +++ b/src/pike_types.h @@ -73,7 +73,7 @@ BLOCK_ALLOC(pike_type, n/a); #define PT_FLAG_MARK_ASSIGN 0x3ff3ff /* Assigns AND Markers. */ /* - * new_check_call() and check_splice_call() flags + * new_check_call(), check_splice_call() and get_first_arg_type() flags */ #define CALL_STRICT 0x0001 /* Strict checking. */ #define CALL_NOT_LAST_ARG 0x0002 /* This is not the last argument. */