Fixed syntax errors.
authorOssama Othman <ossama.othman@intel.com>
Tue, 3 Dec 2013 23:44:40 +0000 (15:44 -0800)
committerOssama Othman <ossama.othman@intel.com>
Tue, 3 Dec 2013 23:44:40 +0000 (15:44 -0800)
Change-Id: I5d8380e3f52f3cff820cbef6a05aa4b9fb80ef94
Signed-off-by: Ossama Othman <ossama.othman@intel.com>
plugins/connman/agent.cpp
plugins/connman/connman_manager.cpp

index a802e65..185e449 100644 (file)
@@ -31,6 +31,7 @@
 #include <settingsd/glib_traits.hpp>
 #include <settingsd/unique_ptr.hpp>
 
+#include <cstring>
 #include <string>
 #include <algorithm>
 #include <stdexcept>
@@ -213,6 +214,7 @@ namespace
 
         gchar    * fname  = nullptr;
         GVariant * fvalue = nullptr;
+        JsonReader * const reader = d.reader.get();
 
         /**
          * @todo Refactor this GVariant dictionary iteration code.
@@ -246,11 +248,13 @@ namespace
                  *       the "Alternates" field is an array of
                  *       strings.
                  */
-                supplied_field = json_reader_get_string_value(reader);
+                supplied_field =
+                  json_reader_get_string_value(reader);
               }
               json_reader_end_member(reader);
 
-              if (supplied_field == nullptr)
+              if (supplied_field == nullptr) {
+              }
 
             }
           }
index d0a9fc8..aa15d55 100644 (file)
@@ -172,6 +172,7 @@ ivi::settings::connman_manager::connman_manager(
                                     "PropertyChanged",
                                     tech_path);
     }
+  }
 
   // Register the Agent implementation responsible for handling input
   // requests for secure and hidden networks.
@@ -180,8 +181,6 @@ ivi::settings::connman_manager::connman_manager(
                              + agent_.object_path());
   }
 
-  GError * error = nullptr;
-
   unique_ptr<GVariant> const ret(
     call_method("RegisterAgent",
                 g_variant_new("(o)",
@@ -189,7 +188,7 @@ ivi::settings::connman_manager::connman_manager(
                 error));
 
   if (ret == nullptr) {
-    unique_ptr<GError> const safe_error(error);
+    safe_error.reset(error);
 
      throw std::runtime_error(
        std::string("Unable to register agent: ") + error->message);