Hi,

I think I found this confusing instruction to be unnecessary:

mach:/ipc/ipc_object.c (ipc_object_alloc.c), line 250:

-         *namep = (mach_port_t)object;
          kr = ipc_entry_alloc(space, namep, &entry);

(With "-", I mean that this line can be removed).

First, I find it confusing because what it does is set the port name to the
address of he underlying ipc (port) object.  The types absolutely don't
match (logically).

Second, the instruction does nothing useful, as namep is overwritten in
ipc_entry_alloc() (really in ipc_entry_get()) with the real name port on
success.  If allocation fails, the ipc object is freed and the pointer
"object" is invalid.

I suggest removing this line from the code.

BTW, do you think there is value in looking at other Machs and analysing
differences? Maybe there are bug fixes or improvements which we can merge
into gnumach.

Thanks,
Marcus

-- 
`Rhubarb is no Egyptian god.' Debian http://www.debian.org [EMAIL PROTECTED]
Marcus Brinkmann              GNU    http://www.gnu.org    [EMAIL PROTECTED]
[EMAIL PROTECTED]
http://www.marcus-brinkmann.de

_______________________________________________
Bug-hurd mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-hurd

Reply via email to