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/command/guid.cpp b/command/guid.cpp
index 67b71e2..8cd95a6 100644
--- a/command/guid.cpp
+++ b/command/guid.cpp
@@ -34,13 +34,12 @@
     sd_bus_message* reply = nullptr;
     sd_bus_error error = SD_BUS_ERROR_NULL;
     sd_bus* bus = ipmid_get_sd_bus_connection();
-    int rc = 0;
     char* uuid = nullptr;
     char* busname = nullptr;
 
     do
     {
-        rc = mapper_get_service(bus, guidObjPath, &busname);
+        int rc = mapper_get_service(bus, guidObjPath, &busname);
         if (rc < 0)
         {
             std::cerr << "Failed to get " << guidObjPath