On Monday, 1. January 2007 17:25, Andreas Schwab wrote: > Ingo Oeser <[email protected]> writes: > > Then this works, because the side effect (+20) is evaluated only once. > > It's not a side effect, it's a non-lvalue, and you can't take the address > of a non-lvalue. Just verified this. So If we cannot make it work in all cases, it will cause more problems then it will solve. So we are left with a function, which will a) only be used by janitors to provide "kfree(x); x = NULL;" with an macro KFREE(x) in all the simple cases. b) be used by developers, who are aware of the fact that reusable pointer values should set to NULL after kfree(). Doing a) and b) is "running into open doors", so doesn't prevent any error, obfuscates code more and works only sometimes. I give up here and would vote for dropping that idea then. Regards Ingo Oeser
Attachment:
pgpZzs2VPw2kb.pgp
Description: PGP signature
- Follow-Ups:
- Re: [PATCH] [DISCUSS] Make the variable NULL after freeing it.
- From: Jan Engelhardt <[email protected]>
- Re: [PATCH] [DISCUSS] Make the variable NULL after freeing it.
- References:
- Re: [PATCH] [DISCUSS] Make the variable NULL after freeing it.
- From: Amit Choudhary <[email protected]>
- Re: [PATCH] [DISCUSS] Make the variable NULL after freeing it.
- From: Ingo Oeser <[email protected]>
- Re: [PATCH] [DISCUSS] Make the variable NULL after freeing it.
- From: Andreas Schwab <[email protected]>
- Re: [PATCH] [DISCUSS] Make the variable NULL after freeing it.
- Prev by Date: Re: Patch "i386: Relocatable kernel support" causes instant reboot
- Next by Date: Re: [PATCH] radeonfb: add support for newer cards
- Previous by thread: Re: [PATCH] [DISCUSS] Make the variable NULL after freeing it.
- Next by thread: Re: [PATCH] [DISCUSS] Make the variable NULL after freeing it.
- Index(es):