[HECnet] New bridge.c feedback

Johnny Billquist bqt at softjar.se
Thu Jun 7 16:59:49 PDT 2012


On 2012-06-07 17:44, Marc Chametzky wrote:
1171 cc: WARNING File = bridge.c, Line = 684
The indicated expression has no effect.

if (port == 0) port == DPORT;
^


Apart from putting in a conditional?

DPORT is a constant that I intended for users that compile to be able
to change, if they want to.
By default is't zero, thus the compiler sees:

if (port == 0) port = 0;


No, that's not what the compiler is seeing. Instead, it's seeing this:

if (port == 0) 1;

That's because you have "port == DPORT" (a conditional, not an
assignment statement).

Jeeeez. When the f* did that sneak in there??? I'm way too tired today (obviously). That was totally meaningless. (Maybe just my brain, knowing what it should say just managed to ignore that extra equal sign.)

Thanks for pointing out the obvious. Fixed now.

	Johnny



More information about the Hecnet-list mailing list