1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

DtSvc/DtEncap: Coverity (memory corruption, moderate)

This commit is contained in:
Jon Trulson 2014-12-26 15:55:02 -07:00
parent 48cfb46a97
commit 9d26729d65

View file

@ -198,7 +198,7 @@ SPC_Channel_Ptr SPC_Initialize_Channel(XeString hostname,
int iomode) int iomode)
/*----------------------------------------------------------------------+*/ /*----------------------------------------------------------------------+*/
{ {
SPC_Channel_Ptr channel; SPC_Channel_Ptr channel = NULL;
/* Check for local or remote machine. If remote, create a /* Check for local or remote machine. If remote, create a
remote channel object */ remote channel object */
@ -468,7 +468,8 @@ SPC_Channel_Ptr open_channel_object(SPC_Channel_Ptr channel,
else else
channel->read_filter=channel->class_ptr->read; channel->read_filter=channel->class_ptr->read;
channel->cid=(int)channel; /* this (cid) should probably just be a long... */
channel->cid=(int) ((long)channel & 0xffffffff);
channel->identifier = Channel_Identifier; channel->identifier = Channel_Identifier;
channel->IOMode = iomode; channel->IOMode = iomode;
channel->wires[STDIN] = (&dummy_wire); channel->wires[STDIN] = (&dummy_wire);