From: Frank Mori Hess Date: Sat, 22 Feb 2003 03:00:26 +0000 (+0000) Subject: removed redundant setting of async->buf_read_count since it is handled by X-Git-Tag: r0_7_67x~79 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6835bc2d0070af7ac5bf0a118ee8784f6be845a5;p=comedi.git removed redundant setting of async->buf_read_count since it is handled by comedi_read_free() call I added --- diff --git a/comedi/kcomedilib/get.c b/comedi/kcomedilib/get.c index 0efa7f60..e38a6983 100644 --- a/comedi/kcomedilib/get.c +++ b/comedi/kcomedilib/get.c @@ -182,21 +182,21 @@ unsigned int comedi_get_buf_head_pos(comedi_t *d,unsigned int subdevice) } /* - * ALPHA (not necessary) + * ALPHA */ int comedi_set_user_int_count(comedi_t *d,unsigned int subdevice,unsigned int buf_user_count) { comedi_device *dev = (comedi_device *)d; comedi_subdevice *s = dev->subdevices + subdevice; comedi_async *async; - unsigned int num_bytes; + int num_bytes; async = s->async; if( async == NULL ) return -1; num_bytes = buf_user_count - async->buf_read_count; + if( num_bytes < 0 ) return -1; comedi_buf_read_free( async, num_bytes ); - async->buf_read_count = buf_user_count; return 0; }