The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM


High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Core Dump vinp UNIX for Advanced & Expert Users 1 10-22-2007 04:49 AM
core dump hassan2 UNIX for Dummies Questions & Answers 4 05-07-2002 05:05 AM
core dump buRst UNIX for Dummies Questions & Answers 2 12-15-2001 08:26 AM
core dump sskb UNIX for Dummies Questions & Answers 6 12-04-2001 11:59 PM
help, what is the difference between core dump and panic dump? aileen UNIX for Dummies Questions & Answers 1 06-11-2001 05:08 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-26-2008
Registered User
 

Join Date: Aug 2007
Posts: 28
Stumble this Post!
Getting Core dump.. Plz Help !!

Hi,

I am getting core dump for the following code in HP-UNIX platform.

void *Et:ppAddr()
{
return(NULL);
}

Can we return a NULL value for a void function ?? I have a program, where almost all functions are written like this. But, for this function, I am getting core dump. Please suggest !! Thanks in advance..
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 07-01-2008
Sivaswami's Avatar
Registered User
 

Join Date: Mar 2007
Location: India
Posts: 57
Stumble this Post!
I think it is throwing due to its usage. are u using the return value else where ?
Reply With Quote
  #3 (permalink)  
Old 07-01-2008
Registered User
 

Join Date: Jun 2008
Posts: 19
Stumble this Post!
First of all it's not a void function, this fuction returns pointer (void *).
There is nothing wrong if function returns null pointer, usually meaning it failed to do job as expected.
Check if you don't derefernce this pointer without null pointer check.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 08:05 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0