fix for comedi_get_generic_timed() from Jan Gukelberger <g.u.g.i@gmx.de>
This commit is contained in:
parent
34ce707da0
commit
4f670c0248
1 changed files with 5 additions and 6 deletions
11
lib/cmd.c
11
lib/cmd.c
|
@ -172,14 +172,13 @@ int _comedi_get_cmd_generic_timed(comedi_t *it,unsigned int subd,comedi_cmd *cmd
|
|||
return -1;
|
||||
}
|
||||
|
||||
if(!s->cmd_timed){
|
||||
if(!s->cmd_timed)
|
||||
s->cmd_timed = malloc(sizeof(comedi_cmd));
|
||||
|
||||
ret = __generic_timed(it,subd,s->cmd_timed,ns);
|
||||
if(ret<0){
|
||||
s->cmd_mask_errno = errno;
|
||||
return -1;
|
||||
}
|
||||
ret = __generic_timed(it,subd,s->cmd_timed,ns);
|
||||
if(ret<0){
|
||||
s->cmd_mask_errno = errno;
|
||||
return -1;
|
||||
}
|
||||
*cmd=*s->cmd_timed;
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue