style: cppcheck cleanup

[command/guid.cpp:37]: (style) The scope of the variable 'rc' can be
reduced.
[socket_channel.hpp:44]: (performance) Variable 'timeout' is assigned
in constructor body. Consider performing initialization in
initialization list.
[sd_event_loop.cpp:107]: (style) The scope of the variable 'instance'
can be reduced.
[sd_event_loop.cpp:108]: (style) The scope of the variable 'rc' can be
reduced.
[sd_event_loop.cpp:142]: (style) The scope of the variable 'instance'
can be reduced.
[sd_event_loop.cpp:304]: (style) The scope of the variable 'rc' can be
reduced.

Change-Id: Id090cb217ea7ed9019f1b8d39ebebd6bb73113b1
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/socket_channel.hpp b/socket_channel.hpp
index 8a2edce..4b10b9a 100644
--- a/socket_channel.hpp
+++ b/socket_channel.hpp
@@ -38,10 +38,9 @@
      *
      * @return None
      */
-    Channel(int insockfd, timeval& inTimeout)
+    Channel(int insockfd, timeval& inTimeout) :
+        sockfd(insockfd), timeout(inTimeout)
     {
-        sockfd = insockfd;
-        timeout = inTimeout;
     }
 
     /**