[PATCH 3/7] unixmessage_receive: reduce auxlen variable scope

From: Roman I Khimov <khimov_at_altell.ru>
Date: Fri, 13 Mar 2015 17:24:22 +0300

Purely stylistic, suggested by cppcheck.
---
 src/libunixonacid/unixmessage_receive.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libunixonacid/unixmessage_receive.c b/src/libunixonacid/unixmessage_receive.c
index 5fa16c4..885a7bc 100644
--- a/src/libunixonacid/unixmessage_receive.c
+++ b/src/libunixonacid/unixmessage_receive.c
_at_@ -49,7 +49,6 @@ static int unixmessage_receiver_fill (unixmessage_receiver_t *b)
     .msg_control = b->fds_ok & 1 ? ancilbuf : 0,
     .msg_controllen = b->fds_ok & 1 ? sizeof(ancilbuf) : 0
   } ;
-  unsigned int auxlen ;
   int r = -1 ;
   if (cbuffer_isfull(&b->mainb) || ((b->fds_ok & 1) && cbuffer_isfull(&b->auxb)))
     return (errno = ENOBUFS, -1) ;
_at_@ -68,6 +67,7 @@ static int unixmessage_receiver_fill (unixmessage_receiver_t *b)
     struct cmsghdr *c = CMSG_FIRSTHDR(&msghdr) ;
     if (c)
     {
+      unsigned int auxlen ;
       if (c->cmsg_level != SOL_SOCKET
        || c->cmsg_type != SCM_RIGHTS) return (errno = EPROTO, -1) ;
       auxlen = (unsigned int)(c->cmsg_len - (CMSG_DATA(c) - (unsigned char *)c)) ;
-- 
2.1.4
Received on Fri Mar 13 2015 - 14:24:22 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:38:49 UTC