nmbd dying...

Luke Kenneth Casson Leighton lkcl at switchboard.net
Wed Sep 30 15:10:15 GMT 1998

> Dead code elimination. I removed a line such as
> allowableaccount = IVAL(q, 0); q += 4;
> as the variable "allowableaccount" was unused.
> I missed the bloody "q += 4;".
> This is why multiple statements on one line are
> a *BUG*. I will eventualy remove *ALL* these (luke
> you have been warned :-).

oh, come on!  i don't do that!  it breaks my coding standards.  the only
curcumstances i will do something like that is:

if (some_bit_test(0)) set_something0;
if (some_bit_test(1)) set_something1;
if (some_bit_test(2)) set_something2;

those q += 4 lines are highly prevalent in ipc.c packet-parsing code.

also, for "informational" purposes, i would recommend that
allowableaccount is put back in, and printed out with a "DEBUG" statement.
if we re-examine the code and find we need to add a feature which uses
allowableaccount (whatever it is) then having this variable removed will
make that job potentially difficult to understand.

More information about the samba-technical mailing list