From 6835bc2d0070af7ac5bf0a118ee8784f6be845a5 Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Sat, 22 Feb 2003 03:00:26 +0000 Subject: [PATCH] removed redundant setting of async->buf_read_count since it is handled by comedi_read_free() call I added --- comedi/kcomedilib/get.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; } -- 2.26.2