[PATCH] Re: [openib-general] 0 op factor

Bernhard Fischer blist at aon.at
Fri May 13 00:35:19 PDT 2005


On Thu, May 12, 2005 at 03:48:57PM -0700, Libor Michalek wrote:
>On Tue, May 10, 2005 at 05:47:00PM -0700, Libor Michalek wrote:
>> On Sat, May 07, 2005 at 07:47:18PM +0200, Bernhard Fischer wrote:
>>
>> > - remove expect from _sdp_cm_path_complete().
>> 
>>   When I said that the SDP_EXPECT should eventually be removed, I meant
>> that the functions which have their return values checked by SDP_EXPECT
>> should either be turned into void return functions, or something 
>> intelligent should be done with the return value, such as error recovery
>> or propogation. The functions which should be turned into void functions
>> are the ones which will never return anything but success.
>
>  To expand on the last point. There are a lot of functions, for
>example those in sdp_buff.c, which check for incorrect function
>usage, such as checking that a buffer is not already in a queue before
>inserting it into a queue. These checks could be removed entirely or
>the checks could be made and a call to BUG() in case the condition
>is met. I prefer the later since the former would corrupt the entire
>queue. I'm not sure which is preferable to everyone else, either way
>the result is that the function becomes a void.

BUG_ON would be fine with me, fwiw. Guess others might have a stronger
opinion regarding either, though.




More information about the general mailing list