Probable boolean logic bug



The below condition always evaluates to true. It seems likely that &&
was intended rather than ||.

Thanks for your time,
Michael


--- libnautilus-private/nautilus-file-operations.c
+++ /tmp/cocci-output-20444-aed54f-nautilus-file-operations.c
@@ -4420,8 +4420,7 @@ do_run_conflict_dialog (gpointer _data)
        if (response == CONFLICT_RESPONSE_RENAME) {
                data->resp_data->new_name = 
                        nautilus_file_conflict_dialog_get_new_name (NAUTILUS_FILE_CONFLICT_DIALOG (dialog));
-       } else if (response != GTK_RESPONSE_CANCEL ||
-                  response != GTK_RESPONSE_NONE) {
+       } else if (response != GTK_RESPONSE_CANCEL && response != GTK_RESPONSE_NONE) {
                   data->resp_data->apply_to_all =
                           nautilus_file_conflict_dialog_get_apply_to_all 
                                (NAUTILUS_FILE_CONFLICT_DIALOG (dialog));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]