[asterisk-dev] [dahdi-commits] kmoore: linux/trunk r9905 - in /linux/trunk: drivers/dahdi/ include/dahdi/
Shaun Ruffell
sruffell at digium.com
Fri Apr 15 11:33:47 CDT 2011
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.
Cheers,
Shaun
--
Shaun Ruffell
Digium, Inc. | Linux Kernel Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: www.digium.com & www.asterisk.org
More information about the asterisk-dev
mailing list