Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2001-04-21
04:14 • Ticket [219008ffff] tclUnixChan.c mixes signed and unsigned status still Clo... artifact: 2a4f7d1b2e user: dgp
2000-10-26
08:33 • Closed ticket [219008ffff]. artifact: 6a42e45dc4 user: welch
01:09 • New ticket [219008ffff]. artifact: 6c05fbc26d user: nobody

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.