From 4f670c0248c3cc18b9f49e227e53a28622cdbdca Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Mon, 25 Apr 2005 21:41:48 +0000 Subject: [PATCH] fix for comedi_get_generic_timed() from Jan Gukelberger --- lib/cmd.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/cmd.c b/lib/cmd.c index 7a3c042..a08a1d1 100644 --- a/lib/cmd.c +++ b/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; -- 2.26.2