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

Author: Jan Kiszka <jan.kis...@siemens.com>
Date:   Sun Jan  4 14:14:34 2015 +0100

sysregd: Fix --linger support

The corresponding option variable was never written, thus --linger had
no effect.

Fixing this makes the compiler complain about a false-positive
uninitialized use of tmfd. Silence that.

Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>

---

 lib/copperplate/regd/regd.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/copperplate/regd/regd.c b/lib/copperplate/regd/regd.c
index 43f763e..780a922 100644
--- a/lib/copperplate/regd/regd.c
+++ b/lib/copperplate/regd/regd.c
@@ -99,7 +99,7 @@ static const struct option options[] = {
 #define linger_opt     3
                .name = "linger",
                .has_arg = 0,
-               .flag = NULL,
+               .flag = &linger,
                .val = 1,
        },
        {
@@ -273,7 +273,7 @@ static void handle_requests(void)
 {
        struct itimerspec its;
        fd_set refset, set;
-       int ret, s, tmfd;
+       int ret, s, tmfd = -1;
        uint64_t exp;
        char c;
 


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

Reply via email to