[Fix][stack-buffer-overflow] Use gboolean when using g_variant_get for boolean.
[platform/core/connectivity/net-config.git] / gtest / network_state.cpp
index b0e0f11..4fad5c8 100755 (executable)
@@ -34,7 +34,7 @@ NetworkState::~NetworkState()
 }
 
 error_e NetworkState::AddRoute(const char *ip, const char *mask, const char *interface,
-const char *gateway, int family, bool *result)
+const char *gateway, int family, gboolean *result)
 {
        GVariant *message = NULL;
        error_e error = ERROR_NONE;
@@ -59,7 +59,7 @@ const char *gateway, int family, bool *result)
 }
 
 error_e NetworkState::RemoveRoute(const char *ip, const char *mask, const char *interface,
-const char *gateway, int family, bool *result)
+const char *gateway, int family, gboolean *result)
 {
        GVariant *message = NULL;
        error_e error = ERROR_NONE;
@@ -212,7 +212,7 @@ error_e NetworkState::DevicePolicyGetWifiProfile(int *state)
 
        return ERROR_NONE;
 }
-error_e NetworkState::GetMeteredInfo(bool *state)
+error_e NetworkState::GetMeteredInfo(gboolean *state)
 {
        GVariant *message = NULL;
        error_e error = ERROR_NONE;
@@ -256,7 +256,7 @@ error_e NetworkState::PreferredIpv6Address(const char *profile, char *address)
 
        return ERROR_NONE;
 }
-error_e NetworkState::GetTCPDumpState(bool *state)
+error_e NetworkState::GetTCPDumpState(gboolean *state)
 {
        GVariant *message = NULL;
        error_e error = ERROR_NONE;