[omniORB] [omnithread] Why is NULL defined as (void*)0?

Keeley, Michael mkeeley@orchestream.com
Thu, 23 Aug 2001 17:46:10 +0100


In the omnithread.h header, NULL is defined to be (void*)0.

Shouldn't this be just 0?
Otherwise code such as

#define NULL (void*) 0

char* foo() {
  return NULL;
}

will not compile - void* cannot be cast to char*.

Mike.

Michael Keeley
___________________________________________________________________________
Software Engineer
T: +44 (0)20 7348 5759
Orchestream 
Avon House, Kensington Village, Avonmore Road, London W14 8TS
T: +44 (0)20 7348 1500 F: +44 (0)20 7348 1501
www.orchestream.com




--
This communication contains confidential information intended solely for the use of the individual/s and/or entity or entities to whom it was intended to be addressed.  If you are not the intended recipient, be aware that any disclosure, copying, distribution, or use of the contents of this transmission is prohibited.  If you have received this communication in error, please contact the sender immediately, delete this communication from your system, and do not disclose its contents to any third party, or use its contents.  Any opinions expressed are solely those of the author and do not necessarily represent those of Orchestream Ltd or its group of companies unless otherwise specifically stated.