From: Mehdi Khaldi <mkhaldi@softaddicts.ca>
To: "'gcc@gcc.gnu.org'" <gcc@gcc.gnu.org>
Subject: about gcc library
Date: Tue, 08 Apr 2003 18:15:00 -0000 [thread overview]
Message-ID: <719596FEB24CD6119DDE00508B8B831D5E72@softaddictsrv01.intsoftaddicts.com> (raw)
Hi,
How to check if a pointer is allocated or not?
I do "if(p == NULL)". This assumes that the developer did "p = NULL;"
But if he didn't do that, how can I know if the pointer is allocated or not?
Example :
Int *p;
If(p == NULL)
Printf("P = NULL\n");
Else
Memset(p, 0, sizeof(int));
I'd like to know if the pointer is allocated.
Thanks
next reply other threads:[~2003-04-08 16:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-08 18:15 Mehdi Khaldi [this message]
2003-04-08 18:57 ` Phil Edwards
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=719596FEB24CD6119DDE00508B8B831D5E72@softaddictsrv01.intsoftaddicts.com \
--to=mkhaldi@softaddicts.ca \
--cc=gcc@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).