Pointer initialization question...

I

infobahn

Old said:
calloc does not generate null pointers.

Stuff and nonsense. The Standard says:


4.10.3.1 The calloc function

[...]

Returns

The calloc function returns either a null pointer or a pointer to
the allocated space.


As you can see, the calloc function certainly can generate a null
pointer if necessary.
 
B

Ben Pfaff

infobahn said:
Stuff and nonsense.

That's what I thought at first, too, but it was pretty clear to
me, on rereading, that "Old Wolf" actually meant that any
pointers *inside the allocated region* are not necessarily set to
null by calloc(). He could certainly have phrased it better.
 
I

infobahn

Ben said:
That's what I thought at first, too, but it was pretty clear to
me, on rereading, that "Old Wolf" actually meant that any
pointers *inside the allocated region* are not necessarily set to
null by calloc(). He could certainly have phrased it better.

If he meant that all-bits-zero doesn't necessarily mean NULL, then
I owe him an apology. If he didn't, I don't. :)
 
L

Lawrence Kirby

On Tue, 28 Dec 2004 00:46:56 -0800, No Such Luck wrote:

....
No, the problem for you is that if half the people here help others
unconditionally, and the other half bitches about "not reading the FAQ"
and "asking obvious homework questions" and eventually killfiles me,
I'll still get a bunch of help.

The question then is whether you consider this sufficient justification
for abusing the newsgroup.

Yes, asking a question that is answered in the FAQ IS abuse, although
there are certainly worse forms. FAQs exists so that the same topics don't
have to be discussed over and over again in the newsgroup. As such looking
at them before posting should not be considered optional. Of course there
is nothing wrong with discussing the answer in the FAQ further.

Lawrence
 
M

Mark McIntyre

Well, look at this thread. Most people have offered help, either after
complaining that I didn't read the FAQ or not.

*shrug*. And you've also been killfiled by several regulars. You're losing
out so far, IMHO.
All help offered,
however, has been correct and contains a high degree of correlation
between them.

The first is unascertainable if you're asking offtopic questions here, and
the second could merely mean you got a load of "me too" answers from
people trying to look clever, or who also read the wrong book.

I repeat: *shrug*.
 
J

Joona I Palaste

Malcolm said:
You seem to have a troll obsession. In fact we have many irritating posters,
but few trolls, who are people who are deliberately trying to disrupt the
ng.
More importantly, most of us are adults and professional programmers. We
really aren't interested in this subject.

What Trollsdale calls an "indigenous troll", humans call a "regular" or
a "clueful poster".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,157
Messages
2,570,879
Members
47,414
Latest member
djangoframe

Latest Threads

Top