Probable boolean logic bug

Michael McConville <[email protected]> Sat, 16 Apr 2016 17:11:04 -0400
Newsgroups gmane.comp.gnome.nautilus
Message-ID <20160416211104.GA56743@thinkpad>
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));
-- 
nautilus-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/nautilus-list