tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] improving get_tok_str


From: Domingo Alvarez Duarte
Subject: Re: [Tinycc-devel] improving get_tok_str
Date: Sat, 29 Mar 2014 15:03:55 +0000

I agree with grischka.


On Sat, Mar 29, 2014 at 2:24 PM, grischka <address@hidden> wrote:
Thomas Preudhomme wrote:
Le 2014-03-15 20:10, mobi phil a écrit :
Hi,

get_tok_str is called in several places with second parameter NULL,

though inside members (thus dereferencing NULL) is possible.

Probably this combination "bad" never happens, but would like to use
this function to understand the code.

Yes, it ought to be fixed. The solution would be simple:

CValue cval;

if (!cv) {
    cval.ull = 0;
    cv = &cval;
}

That doesn't fix anything except that it allows adding invalid
code more easily. ;)

--- grischka



_______________________________________________
Tinycc-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


reply via email to

[Prev in Thread] Current Thread [Next in Thread]