Fix parse warnings
[platform/core/telephony/tel-plugin-indicator.git] / src / s_indi_main.c
index 37a5c5a..3a2c6db 100644 (file)
@@ -391,8 +391,8 @@ gboolean __s_indi_update_callback(__s_indi_cb_user_data *data)
                }
        }
 
-       rx_changes_total = rx_curr_total - rx_prev_total;
-       tx_changes_total = tx_curr_total - tx_prev_total;
+       rx_changes_total = ((rx_curr_total > rx_prev_total) ? (rx_curr_total - rx_prev_total) : S_INDI_ZERO);
+       tx_changes_total = ((tx_curr_total > tx_prev_total) ? (tx_curr_total - tx_prev_total) : S_INDI_ZERO);
 
        if (rx_changes_total)
                cp_state |= S_INDI_TRANSFER_RX;
@@ -559,7 +559,7 @@ void s_indi_storage_key_callback(enum tcore_storage_key key, void *value, void *
        switch (key) {
        case STORAGE_KEY_PM_STATE: {
                GHashTableIter iter;
-               gpointer key, value;
+               gpointer key_info, value_info;
                gint pm_state = S_INDI_ZERO;
 
                if (!g_variant_is_of_type(tmp, G_VARIANT_TYPE_INT32)) {
@@ -572,8 +572,8 @@ void s_indi_storage_key_callback(enum tcore_storage_key key, void *value, void *
                dbg("PM state Value:[%d]", pm_state);
 
                g_hash_table_iter_init(&iter, priv_info->state_info);
-               while (g_hash_table_iter_next(&iter, &key, &value)) {
-                       state_info = value;
+               while (g_hash_table_iter_next(&iter, &key_info, &value_info)) {
+                       state_info = value_info;
                        state_info->dormant_info.lcd_state = pm_state;
                }
        }