Fix coverity issue (1025904). 71/188871/1 accepted/tizen/unified/20180912.061651 submit/tizen/20180911.120738
authorNiraj Kumar Goit <niraj.g@samsung.com>
Tue, 11 Sep 2018 07:25:47 +0000 (12:55 +0530)
committerNiraj Kumar Goit <niraj.g@samsung.com>
Tue, 11 Sep 2018 07:25:47 +0000 (12:55 +0530)
Change-Id: If09ed15943c904c8c35de947a6603f4e37ba736d
Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
src/network_dbus.c

index bf57a26..1ceb659 100755 (executable)
@@ -3101,9 +3101,7 @@ int _net_dbus_config_load_configurations(const gchar *config_id, gchar **name,
                                const gchar *dns_address = g_variant_get_string(value, NULL);
                                (*ip_info)->dns_address[order] = g_strdup(dns_address);
                                order += 1;
-                               (*ip_info)->dns_count = order > NET_DNS_ADDR_MAX ?
-                                       NET_DNS_ADDR_MAX : order;
-                               order %= NET_DNS_ADDR_MAX;
+                               (*ip_info)->dns_count = order;
                        } else if (g_strcmp0(field, WIFI_CONFIG_FAILURE) == 0) {
                                *wifi_last_error = __net_wifi_last_error_to_enum(g_variant_get_string(value, NULL));
                        }