From: David Schleef Date: Wed, 2 Feb 2000 05:16:13 +0000 (+0000) Subject: patch from tomasz X-Git-Tag: r0_7_9~3 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=845f3ad55327a0b4bc7968c2a0fb694af7ddbfb5;p=comedilib.git patch from tomasz --- diff --git a/lib/timed.c b/lib/timed.c index 432cb2e..d2876ef 100644 --- a/lib/timed.c +++ b/lib/timed.c @@ -55,6 +55,9 @@ int comedi_timed_1chan(comedi_t *dev,unsigned int subd,unsigned int chan,unsigne /* check range */ + the_range=comedi_get_range(dev,subd,chan,range); + maxdata=comedi_get_maxdata(dev,subd,chan); + chan=CR_PACK(chan,range,aref); t.subdev=subd; @@ -65,9 +68,6 @@ int comedi_timed_1chan(comedi_t *dev,unsigned int subd,unsigned int chan,unsigne comedi_get_timer(dev,subd,freq,&t.trigvar,&act_freq); t.trigvar1=1; - the_range=comedi_get_range(dev,subd,chan,range); - maxdata=comedi_get_maxdata(dev,subd,chan); - buffer=malloc(sizeof(sampl_t)*BUFSZ); if(!buffer)return -1;