diff --git a/cmdline/standalone_cli_tools/CtaVerifyFile.cpp b/cmdline/standalone_cli_tools/CtaVerifyFile.cpp index 1164dc178ea30517c471c10842976085cf9d6990..68a7826f0e64154f033f5a7ff68c37fd933b8f0b 100644 --- a/cmdline/standalone_cli_tools/CtaVerifyFile.cpp +++ b/cmdline/standalone_cli_tools/CtaVerifyFile.cpp @@ -164,7 +164,7 @@ int exceptionThrowingMain(int argc, char *const *const argv) std::vector archiveFileIds; - if((!cmdLineArgs.m_archiveFileId && !cmdLineArgs.m_archiveFileIds)) { + if (!cmdLineArgs.m_archiveFileId && !cmdLineArgs.m_archiveFileIds) { cmdLineArgs.printUsage(std::cout); std::cout << "Missing command-line option: --id or --filename must be provided" << std::endl; throw std::runtime_error(""); diff --git a/cmdline/standalone_cli_tools/change_storage_class/ChangeStorageClass.cpp b/cmdline/standalone_cli_tools/change_storage_class/ChangeStorageClass.cpp index 4b436e761340ff5f6ec476636cd5c0c84b895058..712daf574a223977ae72748e7f4231ade69746a1 100644 --- a/cmdline/standalone_cli_tools/change_storage_class/ChangeStorageClass.cpp +++ b/cmdline/standalone_cli_tools/change_storage_class/ChangeStorageClass.cpp @@ -144,9 +144,19 @@ void ChangeStorageClass::handleArguments(const CmdLineArgs &cmdLineArgs) { throw exception::UserError("Missing required option when not providing a path to an input file: storage.class.name"); } - if ((!cmdLineArgs.m_archiveFileId || !cmdLineArgs.m_fids || !cmdLineArgs.m_diskInstance)) { + if (!cmdLineArgs.m_archiveFileId) { cmdLineArgs.printUsage(std::cout); - throw exception::UserError("Archive id, eos file id and disk instance must be provided must be provided"); + throw exception::UserError("Archive ID must be provided."); + } + + if (!cmdLineArgs.m_fids) { + cmdLineArgs.printUsage(std::cout); + throw exception::UserError("Disk file ID must be provided."); + } + + if (!cmdLineArgs.m_diskInstance) { + cmdLineArgs.printUsage(std::cout); + throw exception::UserError("Disk instance must be provided."); } m_storageClassName = cmdLineArgs.m_storageClassName.value(); diff --git a/objectstore/GarbageCollector.cpp b/objectstore/GarbageCollector.cpp index 523720c8acaf6b93ca3ce416fd16787a348841e8..d3e0a8a39526cfd76b44d028b17b954efaa0dd25 100644 --- a/objectstore/GarbageCollector.cpp +++ b/objectstore/GarbageCollector.cpp @@ -309,7 +309,7 @@ void GarbageCollector::OwnedObjectSorter::sortFetchedObjects(Agent& agent, std:: obj.reset(); bool jobRequeued=false; for (auto &j: ar->dumpJobs()) { - if ((j.owner == agent.getAddressIfSet() && ar->c_statusesImplyingQueueing.count(j.status))) { + if (j.owner == agent.getAddressIfSet() && ar->c_statusesImplyingQueueing.count(j.status)) { std::string containerIdentifier; try { if(ar->c_statusesImplyingQueueingByRepackRequestAddress.count(j.status)){