From 63760cd135dd26e03da1a05008a4a35f1a1006fc Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Fri, 16 May 2003 15:25:44 -0700 Subject: [PATCH] Fix naming: "is_void_ptr()" did _not_ test for void pointers, but for NULL pointers (whether marked "void *" or not). --- evaluate.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/evaluate.c b/evaluate.c index cdc01399..21e662f4 100644 --- a/evaluate.c +++ b/evaluate.c @@ -680,7 +680,7 @@ static int compatible_integer_types(struct symbol *ltype, struct symbol *rtype) return (is_int_type(ltype) && is_int_type(rtype)); } -static int is_void_ptr(struct expression *expr) +static int is_null_ptr(struct expression *expr) { return (expr->type == EXPR_VALUE && expr->value == 0); @@ -694,12 +694,12 @@ static struct symbol *compatible_ptr_type(struct expression *left, struct expres struct symbol *ltype = left->ctype, *rtype = right->ctype; if (ltype->type == SYM_PTR) { - if (is_void_ptr(right)) + if (is_null_ptr(right)) return ltype; } if (rtype->type == SYM_PTR) { - if (is_void_ptr(left)) + if (is_null_ptr(left)) return rtype; } return NULL; -- 2.11.4.GIT