From: Al Viro <viro@ftp.linux.org.uk>
To: linux-sparse@vger.kernel.org
Subject: [PATCH 6/16] remove useless argument in evaluate_ptr_sub()
Date: Sun, 24 Jun 2007 09:04:11 +0100 [thread overview]
Message-ID: <E1I2N4t-0003cz-6J@ZenIV.linux.org.uk> (raw)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
evaluate.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/evaluate.c b/evaluate.c
index 5eba817..2203e67 100644
--- a/evaluate.c
+++ b/evaluate.c
@@ -836,12 +836,12 @@ static int is_null_ptr(struct expression *expr)
*/
#define MOD_IGN (MOD_VOLATILE | MOD_CONST)
-static struct symbol *evaluate_ptr_sub(struct expression *expr, struct expression *l, struct expression **rp)
+static struct symbol *evaluate_ptr_sub(struct expression *expr, struct expression *l)
{
const char *typediff;
struct symbol *ctype;
struct symbol *ltype, *rtype;
- struct expression *r = *rp;
+ struct expression *r = expr->right;
ltype = degenerate(l);
rtype = degenerate(r);
@@ -851,7 +851,7 @@ static struct symbol *evaluate_ptr_sub(struct expression *expr, struct expressio
* right thing.
*/
if (!is_ptr_type(rtype))
- return evaluate_ptr_add(expr, degenerate(l), rp);
+ return evaluate_ptr_add(expr, degenerate(l), &expr->right);
ctype = ltype;
typediff = type_difference(ltype, rtype, ~MOD_SIZE, ~MOD_SIZE);
@@ -902,7 +902,7 @@ static struct symbol *evaluate_sub(struct expression *expr)
struct symbol *ltype = left->ctype;
if (is_ptr_type(ltype))
- return evaluate_ptr_sub(expr, left, &expr->right);
+ return evaluate_ptr_sub(expr, left);
return evaluate_arith(expr, 1);
}
--
1.5.0-rc2.GIT
reply other threads:[~2007-06-24 8:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1I2N4t-0003cz-6J@ZenIV.linux.org.uk \
--to=viro@ftp.linux.org.uk \
--cc=linux-sparse@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).