lkml.org 
[lkml]   [1999]   [May]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: fork() Problem?
Date
I think it is official; I am sincerely sorry to say that R. B. Johnson is an
idiot. I am usually not this inflammatory but I can't take this anymore.
Here a colleague and I are ROFL while we read his responses but this takes
the price, "... tested if the assignment succeeded. ..." Anyone please tell
me how assignments fail in C? And this is after 3 quotes from the ANSI C and
K&R.

You know the categorization of people whether they are arrogant and/or
stupid. If the guy is smart and arrogant, you can deal with him because he
can be shown his mistakes. If he is stupid but humble, he accepts that he
may have made a mistake but if he is both stupid and arrogant, there is no
way to deal with him. I am glad I am not working for analogic.

muzo

-----Original Message-----
From: owner-linux-kernel@vger.rutgers.edu
[mailto:owner-linux-kernel@vger.rutgers.edu]On Behalf Of Richard B. Johnson
Sent: Wednesday, May 05, 1999 1:42 PM
To: Kurt Garloff
Cc: Yavuz Selim Komur; davem@redhat.com; linux-kernel@vger.rutgers.edu
Subject: Re: fork() Problem?
> if (pid = fork()) do_smth;
>
> is identical to
>
> if ((pid = fork()) != 0) do_smth;
>

Not so. Your first instance tested if the assignment succeeded. It
is a common error called 'boolean test of assignment' and is the
most common error I've seen in 'C' coding.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.054 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site