From 96fb1c780e7cebaf9fe6c4f48c8ddc5127d297d4 Mon Sep 17 00:00:00 2001 From: Boris Egorov Date: Wed, 24 Sep 2014 13:05:49 +0700 Subject: libcaja-private: fix always-false expressions CppCheck detected a few 'always false' expressions in caja. First two definitely appeareed due to copy-paste (mime-types comparison). It would be nice to move x_content_type's and corresponding greetings to some table (array of structs), wouldn't it? The last one looks like copy-paste problem too. There were two identical blocks of code in move_file_prepare() checking conflict type. BTW, there is exactly the same code in the same file inside copy_move_file(). According to DRY, it would be nice to move this code to its own function. --- libcaja-private/caja-autorun.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libcaja-private/caja-autorun.c') diff --git a/libcaja-private/caja-autorun.c b/libcaja-private/caja-autorun.c index 2896cb9d..5c7bfec8 100644 --- a/libcaja-private/caja-autorun.c +++ b/libcaja-private/caja-autorun.c @@ -1052,11 +1052,11 @@ show_dialog: { media_greeting = _("You have just inserted a blank DVD."); } - else if (strcmp (x_content_type, "x-content/blank-cd") == 0) + else if (strcmp (x_content_type, "x-content/blank-bd") == 0) { media_greeting = _("You have just inserted a blank Blu-Ray disc."); } - else if (strcmp (x_content_type, "x-content/blank-cd") == 0) + else if (strcmp (x_content_type, "x-content/blank-hddvd") == 0) { media_greeting = _("You have just inserted a blank HD DVD."); } -- cgit v1.2.1