[prev in list] [next in list] [prev in thread] [next in thread] 

List:       hurd-bug
Subject:    Re: Confusing definitions and declarations of mig_dealloc_reply_port()
From:       Diego Nieto Cid <dnietoc () gmail ! com>
Date:       2015-11-05 1:34:24
Message-ID: CAK5adC7P2=zbWnZ3JvSSHtL3wAq42LmFOm3VDuHFPrhV5qSzGg () mail ! gmail ! com
[Download RAW message or body]

2015-11-04 16:03 GMT-03:00 Svante Signell <svante.signell@gmail.com>:
> On Wed, 2015-11-04 at 18:57 +0100, Samuel Thibault wrote:
> > Diego Nieto Cid, on Wed 04 Nov 2015 10:50:35 -0300, wrote:
> > >   assert (__hurd_local_reply_port == arg || arg == MACH_PORT_NULL)
> > >
> > > AIUI any other values are bogus given how 'mig_get_reply_port' and
> > > 'mig_dealloc_reply_port' are meant to be paired.
> >
> > That's probably a good thing to do, yes.
>
> What's wrong with?
> mach_port_t port = __hurd_local_reply_port;
> assert (port == arg || arg == MACH_PORT_NULL)
>

That's ok. I just rewrote it to make clear what the accepted values were.
Because the second patch incorporated an if statement that converted the
suggested condition in a tautology.

[Attachment #3 (text/html)]

<div dir="ltr"><br>2015-11-04 16:03 GMT-03:00 Svante Signell &lt;<a \
href="mailto:svante.signell@gmail.com">svante.signell@gmail.com</a>&gt;:<br>&gt; On \
Wed, 2015-11-04 at 18:57 +0100, Samuel Thibault wrote:<br>&gt; &gt; Diego Nieto Cid, \
on Wed 04 Nov 2015 10:50:35 -0300, wrote:<br>&gt; &gt; &gt;    assert \
(__hurd_local_reply_port == arg || arg == MACH_PORT_NULL)<br>&gt; &gt; &gt;<br>&gt; \
&gt; &gt; AIUI any other values are bogus given how &#39;mig_get_reply_port&#39; \
and<br>&gt; &gt; &gt; &#39;mig_dealloc_reply_port&#39; are meant to be \
paired.<br>&gt; &gt;<br>&gt; &gt; That&#39;s probably a good thing to do, \
yes.<br>&gt;<br>&gt; What&#39;s wrong with?<br>&gt; mach_port_t port = \
__hurd_local_reply_port;<br>&gt; assert (port == arg || arg == \
MACH_PORT_NULL)<br>&gt;<br><div><br></div><div>That&#39;s ok. I just rewrote it to \
make clear what the accepted values were. Because the second patch incorporated an if \
statement that converted the suggested condition in a tautology.</div></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic