]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rados_sync.cc: remove dead and not needed code
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 10 May 2013 11:44:50 +0000 (13:44 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 10 May 2013 22:02:55 +0000 (00:02 +0200)
The first if handles all chars < 32, the last 2 if's check for
'\n' (10) and '\r' (13). This code will never be reached and
is already covered. Remove unneeded code.

CID 1019549 Logically dead code (CWE-561)

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/rados_sync.cc

index 5d4bae198f660bddd8153ad70e31adae2013e83a..c55e5b21bea190597a6400d197a4350e38f96a41 100644 (file)
@@ -185,14 +185,6 @@ std::string ExportDir::get_fs_path(const std::string &rados_name) const
       c = '_';
       need_hash = true;
     }
-    else if (c == '\n') {
-      c = '@';
-      need_hash = true;
-    }
-    else if (c == '\r') {
-      c = '@';
-      need_hash = true;
-    }
     fs_path[i] = c;
   }