aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_utilities
diff options
context:
space:
mode:
authorwarptangent <warptangent@inbox.com>2015-05-15 17:06:59 -0700
committerwarptangent <warptangent@inbox.com>2015-05-15 17:23:01 -0700
commit2b2dbd887d7b57fabfe18d09e2a2bd09e2eec358 (patch)
treec2414919cbe84f8eb57b65a3b819cd4bd6a35ea0 /src/blockchain_utilities
parentMerge pull request #284 (diff)
downloadmonero-2b2dbd887d7b57fabfe18d09e2a2bd09e2eec358.tar.xz
Check if chunk size is zero instead of negative
This corrects an unnecessary check and fixes compile error on OS X.
Diffstat (limited to 'src/blockchain_utilities')
-rw-r--r--src/blockchain_utilities/blockchain_import.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/blockchain_utilities/blockchain_import.cpp b/src/blockchain_utilities/blockchain_import.cpp
index 6777cc8fb..84153c20d 100644
--- a/src/blockchain_utilities/blockchain_import.cpp
+++ b/src/blockchain_utilities/blockchain_import.cpp
@@ -288,8 +288,8 @@ int import_from_file(FakeCore& simple_core, std::string& import_file_path, uint6
{
LOG_PRINT_L0("NOTE: chunk_size " << chunk_size << " > 100000");
}
- else if (chunk_size < 0) {
- LOG_PRINT_L0("ERROR: chunk_size " << chunk_size << " < 0");
+ else if (chunk_size == 0) {
+ LOG_PRINT_L0("ERROR: chunk_size == 0");
return 2;
}
import_file.read(buffer_block, chunk_size);