bsteve@cuuxb.ATT.COM (Netnews Administrator) (04/04/89)
The expression and assignment on line 411 of src/etc/inetd.c of 4.3 results in an ambiguous assignment. sep->se_wait = strcmp(arg, "wait") == 0; The result is that specifications for inetd to wait for daemons fail with certain compilers and on various machine architectures, always assigning sep->se_wait to be 0. Steve Blasingame (bsteve@cuuxb.att.com)
chris@mimsy.UUCP (Chris Torek) (04/05/89)
In article <2682@cuuxb.ATT.COM> bsteve@cuuxb.ATT.COM (Netnews Administrator) [Netnews Administrator??] writes: >The expression and assignment on line 411 of src/etc/inetd.c of 4.3 >results in an ambiguous assignment. > > sep->se_wait = strcmp(arg, "wait") == 0; This is not ambiguous---it means call strcmp with arguments `arg' and `wait' compare result of strcmp with 0, producing 1 (if equal) or 0 (if not equal) assign result of comparison (0/1) to sep->se_wait Any compiler that does something else is broken. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris
gwyn@smoke.BRL.MIL (Doug Gwyn ) (04/05/89)
In article <2682@cuuxb.ATT.COM> bsteve@cuuxb.ATT.COM (Netnews Administrator) writes:
- The expression and assignment on line 411 of src/etc/inetd.c of 4.3
- results in an ambiguous assignment.
- sep->se_wait = strcmp(arg, "wait") == 0;
- The result is that specifications for inetd to wait for daemons fail
- with certain compilers and on various machine architectures, always
- assigning sep->se_wait to be 0.
Harumph. What exactly is supposed to be the problem with this?
It is perfectly unambiguous and so far as I can see, correct.
That's not to say that inetd doesn't have bugs, just that this
isn't one of them.