Merge "adb: remove superfluous checks." am: 8c2fb1f3de am: 68fc89d92b
am: a83913d344
* commit 'a83913d3441d7ec57639dcf40bfd5fccf73fe9df':
adb: remove superfluous checks.
diff --git a/adb/file_sync_client.cpp b/adb/file_sync_client.cpp
index 44f3cfd..7e9f605 100644
--- a/adb/file_sync_client.cpp
+++ b/adb/file_sync_client.cpp
@@ -545,9 +545,7 @@
std::string rpath, bool check_timestamps,
bool list_only) {
// Make sure that both directory paths end in a slash.
- if (lpath.empty() || rpath.empty()) {
- return false;
- }
+ // Both paths are known to exist, so they cannot be empty.
if (lpath.back() != '/') {
lpath.push_back('/');
}
@@ -717,9 +715,7 @@
static bool copy_remote_dir_local(SyncConnection& sc, std::string rpath,
std::string lpath, bool copy_attrs) {
// Make sure that both directory paths end in a slash.
- if (rpath.empty() || lpath.empty()) {
- return false;
- }
+ // Both paths are known to exist, so they cannot be empty.
if (rpath.back() != '/') {
rpath.push_back('/');
}