Tux

...making Linux just a little more fun!

Talkback:130/lg_talkback.html

Chris Clayton [chris_clayton at f1internet.com]
Sun, 8 Oct 2006 21:16:07 +0000

Hi,

Harring Figueiredo suggested:

Shouldn't the tests be if(buffer_... = NULL)? Probably a typo

You agreed.

In fact, shouldn't it be if(buffer_... == NULL)? (Comparison, not assignment).

Regards

Chris


Top    Back


Benjamin A. Okopnik [ben at linuxgazette.net]
Sun, 8 Oct 2006 22:45:02 -0400

On Sun, Oct 08, 2006 at 09:16:07PM +0000, Chris Clayton wrote:

> Hi,
> 
> Harring Figueiredo suggested:
> 
> Shouldn't the tests be if(buffer_... = NULL)? Probably a typo
> 
> You agreed.
> 
> In fact, shouldn't it be if(buffer_... == NULL)? (Comparison, not assignment).

Chris, Harring had actually written it the right way; the problem is that our Mailbag editor was still getting used to processing the content, and managed to scrog that whole exchange. If you take a look at the original article (https://linuxgazette.net/129/appaiah.html), you'll see that the correction I made to the text uses a '==', not a '='.

(I don't think my fingers would have let me type 'if (x = y)' in anything but a citation of wrong code; I've done a lot of programming and teaching over the years, and am allergic to testing the '=' operator for success or failure. :)

* Ben Okopnik * Editor-in-Chief, Linux Gazette * https://LinuxGazette.NET *


Top    Back