[asterisk-dev] [dahdi-commits] kmoore: linux/trunk r9905 - in /linux/trunk: drivers/dahdi/ include/dahdi/

Kinsey Moore kmoore at digium.com
Fri Apr 15 13:28:24 CDT 2011


On 04/15/2011 11:33 AM, Shaun Ruffell wrote:
> On Fri, Apr 15, 2011 at 11:28:33AM -0500, Shaun Ruffell wrote:
>    
>> On 04/15/2011 11:16 AM, SVN commits to the DAHDI project wrote:
>>      
>>> Author: kmoore
>>> Date: Fri Apr 15 11:16:19 2011
>>> New Revision: 9905
>>>        
>> ...
>>      
>>> +	case DAHDI_BUFFER_EVENTS:
>>> +		if (get_user(j, (int __user *)data) != -EFAULT&&  j)
>>> +			set_bit(DAHDI_FLAGBIT_BUFEVENTS,&chan->flags);
>>> +		else
>>> +			clear_bit(DAHDI_FLAGBIT_BUFEVENTS,&chan->flags);
>>> +
>>> +		break;
>>>        
>> Hmm....if the read from user space fails we assume that the user wanted to set
>> the buffer events?
>>      
> Hrmm. I mean clear the buffer events.
>
>    
>> I do not think that is best. I would prefer to see it left unchanged. I should
>> have been more clear when I looked at the initial version of this patch.
>>      
> My strong preference is also to not chain the fetching of the parameter along
> with a test of the value you just fetched in the same conditional
Ah, you have a good point.  I'll correct this immediately.

Kinsey



More information about the asterisk-dev mailing list