mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-04-21 07:40:50 +02:00
util: fix _log_connection_sort_names_fcn()
Coverity: Defect type: CONSTANT_EXPRESSION_RESULT src/NetworkManagerUtils.c:1978: same_on_both_sides: "(v1->diff_result & NM_SETTING_DIFF_RESULT_IN_B) != (v1->diff_result & NM_SETTING_DIFF_RESULT_IN_B)" is always false regardless of the values of its operands because those operands are identical. This occurs as the logical operand of if.
This commit is contained in:
parent
d637b3efae
commit
e52f352339
1 changed files with 2 additions and 2 deletions
|
|
@ -2015,9 +2015,9 @@ _log_connection_sort_names_fcn (gconstpointer a, gconstpointer b)
|
|||
/* we want to first show the items, that disappeared, then the one that changed and
|
||||
* then the ones that were added. */
|
||||
|
||||
if ((v1->diff_result & NM_SETTING_DIFF_RESULT_IN_A) != (v1->diff_result & NM_SETTING_DIFF_RESULT_IN_A))
|
||||
if ((v1->diff_result & NM_SETTING_DIFF_RESULT_IN_A) != (v2->diff_result & NM_SETTING_DIFF_RESULT_IN_A))
|
||||
return (v1->diff_result & NM_SETTING_DIFF_RESULT_IN_A) ? -1 : 1;
|
||||
if ((v1->diff_result & NM_SETTING_DIFF_RESULT_IN_B) != (v1->diff_result & NM_SETTING_DIFF_RESULT_IN_B))
|
||||
if ((v1->diff_result & NM_SETTING_DIFF_RESULT_IN_B) != (v2->diff_result & NM_SETTING_DIFF_RESULT_IN_B))
|
||||
return (v1->diff_result & NM_SETTING_DIFF_RESULT_IN_B) ? 1 : -1;
|
||||
return strcmp (v1->item_name, v2->item_name);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue