Module: xenomai-forge
Branch: next
Commit: ea7147d0e16d5dd27cce559f55ac59190db0c423
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=ea7147d0e16d5dd27cce559f55ac59190db0c423

Author: Philippe Gerum <r...@xenomai.org>
Date:   Mon Aug 11 17:59:46 2014 +0200

utils/autotune: fix error output

---

 utils/autotune/autotune.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/utils/autotune/autotune.c b/utils/autotune/autotune.c
index 2ca10d5..874b4e4 100644
--- a/utils/autotune/autotune.c
+++ b/utils/autotune/autotune.c
@@ -192,15 +192,15 @@ static void run_tuner(int fd, int op, int period, const 
char *type)
        pthread_t sampler;
        int ret;
 
+       ret = ioctl(fd, op, &period);
+       if (ret)
+               error(1, errno, "setup failed (%s)", type);
+
        if (!quiet) {
                printf("%s gravity... ", type);
                fflush(stdout);
        }
 
-       ret = ioctl(fd, op, &period);
-       if (ret)
-               error(1, errno, "setup failed (%s)", type);
-
        if (op == AUTOTUNE_RTIOC_USER)
                create_sampler(&sampler, fd);
 


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to