Avoid redudant tests (#521851) Patch from Josselin Mouette
authorAlexander Larsson <alexl@redhat.com>
Fri, 14 Mar 2008 11:15:49 +0000 (11:15 +0000)
committerAlexander Larsson <alexl@src.gnome.org>
Fri, 14 Mar 2008 11:15:49 +0000 (11:15 +0000)
2008-03-14  Alexander Larsson  <alexl@redhat.com>

        * gunixmounts.c:
        (guess_mount_type):
Avoid redudant tests (#521851)
Patch from Josselin Mouette

svn path=/trunk/; revision=6710

gio/ChangeLog
gio/gunixmounts.c

index b94f57b45806a00eb0907e7715fb8a7486813659..d566ed7ac3a745fbd6929ca7d59b31a1c9fb3cb1 100644 (file)
@@ -1,3 +1,10 @@
+2008-03-14  Alexander Larsson  <alexl@redhat.com>
+
+        * gunixmounts.c:
+        (guess_mount_type):
+       Avoid redudant tests (#521851)
+       Patch from Josselin Mouette
+
 2008-03-14  Alexander Larsson  <alexl@redhat.com>
 
         * gfilemonitor.c:
index 486a21b3dab0736ca19604226bdf67dd1ca75ffd..cc7090d5c168844d7d756b4034f3c950257fe6fc 100644 (file)
@@ -1598,27 +1598,10 @@ guess_mount_type (const char *mount_path,
     {
       basename = g_path_get_basename (mount_path);
       
-      if (g_str_has_prefix (basename, "cdrom") ||
+      if (g_str_has_prefix (basename, "cdr") ||
          g_str_has_prefix (basename, "cdwriter") ||
          g_str_has_prefix (basename, "burn") ||
-         g_str_has_prefix (basename, "cdr") ||
-         g_str_has_prefix (basename, "cdrw") ||
-         g_str_has_prefix (basename, "dvdrom") ||
-         g_str_has_prefix (basename, "dvdram") ||
-         g_str_has_prefix (basename, "dvdr") ||
-         g_str_has_prefix (basename, "dvdrw") ||
-         g_str_has_prefix (basename, "cdrom_dvdrom") ||
-         g_str_has_prefix (basename, "cdrom_dvdram") ||
-         g_str_has_prefix (basename, "cdrom_dvdr") ||
-         g_str_has_prefix (basename, "cdrom_dvdrw") ||
-         g_str_has_prefix (basename, "cdr_dvdrom") ||
-         g_str_has_prefix (basename, "cdr_dvdram") ||
-         g_str_has_prefix (basename, "cdr_dvdr") ||
-         g_str_has_prefix (basename, "cdr_dvdrw") ||
-         g_str_has_prefix (basename, "cdrw_dvdrom") ||
-         g_str_has_prefix (basename, "cdrw_dvdram") ||
-         g_str_has_prefix (basename, "cdrw_dvdr") ||
-         g_str_has_prefix (basename, "cdrw_dvdrw"))
+         g_str_has_prefix (basename, "dvdr"))
        type = G_UNIX_MOUNT_TYPE_CDROM;
       else if (g_str_has_prefix (basename, "floppy"))
        type = G_UNIX_MOUNT_TYPE_FLOPPY;