tclUnixChan.c mixes signed and unsigned
Closed / Fixed219008ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 01:09:15
OriginalBugID: 3878 Bug
Version: 8.0.5
SubmitDate: '1999-12-14'
LastModified: '2000-01-24'
Severity: LOW
Status: Released
Submitter: techsupp
ChangedBy: hobbs
OS: BSD
OSVersion: netbsd
Machine: Tera MTX
FixedDate: '2000-01-24'
FixedInVersion: 8.3
ClosedDate: '2000-10-25'
Name: Robert R. Henry
ObservedBehavior:
tclUnixChan.c contains the test
if (addr.s_addr == -1) {
on a netbsd port, where sizeof(int)==8, sizeof(short)==4,
sizeof(addr.s_addr)==4, this comparision results in a test
ofa 32 bit unsigned (s_addr) with a 64 bit signed number,
and the comparision always fails.
DesiredBehavior:
The value -1 should be type cast to the same type as s_addr;
or a manifest constant should be used for the value -1 (broadcast mask);
or the explicit constant 0xffffffff should be used;
In 8.3.0, the '-1' was changed to '0xFFFFFFFFFFFFFFFF', which will
be -1 for 32 or 64 bits.
-- 01/23/2000 hobbs
Wrong fix. The intention was to make it be 32 bits at all times.
The constant was changed to 0xFFFFFFFF (-1 for 32 bits).
-- 01/24/2000 hobbs
welch Closed ticket [219008ffff].
[History diff]2000-10-26 08:33:08
dgp Ticket [219008ffff]: 3 changes
[History diff]2001-04-21 04:14:49
Log in (anonymous is fine) to add a comment.