Re: [PATCH] The require_context attribute

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Dienstag, 1. April 2008 16:10:27 schrieb Marko Kreen:
> On 4/1/08, Philipp Reisner <philipp.reisner@xxxxxxxxxx> wrote:
> > Am Dienstag, 1. April 2008 12:07:17 schrieb Darren Jenkins:
> > > G'day Philipp
> > >
> >  > On Mon, Mar 31, 2008 at 11:00 PM, Philipp Reisner
> >  >
> >  > <philipp.reisner@xxxxxxxxxx> wrote:
> >  > >  +       ctc = &ctype->ctype;
> >  > >  +       if (ctc)
> >  > >  +               ad->ctx_reqs = ctc->ctx_reqs;
> >  >
> >  > is this right ? or am I just confused ?
> >
> > Good day Darren,
> >
> >  Could you elaborate in a bit more detail your concerns regarding
> >  these lines ?
>
> You take an address, how can it be NULL?

Oh, right, now I see it. Sorry. Of course that can not be NULL.

diff --git a/linearize.c b/linearize.c
index 6d401df..67c8744 100644
--- a/linearize.c
+++ b/linearize.c
@@ -888,14 +888,11 @@ static int linearize_address_gen(struct entrypoint *ep,
 	struct access_data *ad)
 {
 	struct symbol *ctype = expr->ctype;
-	struct ctype *ctc = NULL;
 
 	if (!ctype)
 		return 0;
 
-	ctc = &ctype->ctype;
-	if (ctc)
-		ad->ctx_reqs = ctc->ctx_reqs;
+	ad->ctx_reqs = ctype->ctype.ctx_reqs;
 	ad->pos = expr->pos;
 	ad->result_type = ctype;
 	ad->source_type = base_type(ctype);

-Phil
-- 
: Dipl-Ing Philipp Reisner                      Tel +43-1-8178292-50 :
: LINBIT Information Technologies GmbH          Fax +43-1-8178292-82 :
: Vivenotgasse 48, 1120 Vienna, Austria        http://www.linbit.com :
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux