corinthia-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dennis E. Hamilton" <dennis.hamil...@acm.org>
Subject RE: Tests for malloc (console version)
Date Sat, 28 Feb 2015 04:05:11 GMT
 -- replying in-line to --
From: Gabriela Gibson [mailto:gabriela.gibson@gmail.com] 
Sent: Friday, February 27, 2015 15:27
To: dev
Subject: Tests for malloc (console version)

[ ... ]

void xfree(void *ptr)
{
    if (ptr == NULL)
        return;
    free(ptr);
    ptr = NULL;
<orcmid>
    I don't think this assignment to ptr
    accomplishes anything.  It's legal,
    just doesn't go anywhere.  I bet the
    optimizer tosses it.
</orcmid>
}

[ ... ]


-- 
Visit my Coding Diary: http://gabriela-gibson.blogspot.com/


Mime
View raw message