diff options
Diffstat (limited to 'paludis/repositories')
16 files changed, 40 insertions, 40 deletions
diff --git a/paludis/repositories/accounts/accounts_repository.cc b/paludis/repositories/accounts/accounts_repository.cc index e18db9d7c..b787987ec 100644 --- a/paludis/repositories/accounts/accounts_repository.cc +++ b/paludis/repositories/accounts/accounts_repository.cc @@ -108,9 +108,9 @@ AccountsRepository::AccountsRepository(const AccountsRepositoryParams & p) : p.environment(), p.name(), make_named_values<RepositoryCapabilities>( - n::destination_interface() = static_cast<RepositoryDestinationInterface *>(0), - n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(0), - n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0) + n::destination_interface() = static_cast<RepositoryDestinationInterface *>(nullptr), + n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(nullptr), + n::manifest_interface() = static_cast<RepositoryManifestInterface *>(nullptr) )), _imp(p.name(), p) { @@ -123,8 +123,8 @@ AccountsRepository::AccountsRepository(const InstalledAccountsRepositoryParams & p.name(), make_named_values<RepositoryCapabilities>( n::destination_interface() = this, - n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(0), - n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0) + n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(nullptr), + n::manifest_interface() = static_cast<RepositoryManifestInterface *>(nullptr) )), _imp(p.name(), p) { diff --git a/paludis/repositories/accounts/installed_accounts_id.cc b/paludis/repositories/accounts/installed_accounts_id.cc index 4bba75464..a80743787 100644 --- a/paludis/repositories/accounts/installed_accounts_id.cc +++ b/paludis/repositories/accounts/installed_accounts_id.cc @@ -142,7 +142,7 @@ InstalledAccountsID::need_keys_added() const struct group grp; struct group * grp_result; - if (0 == getgrgid_r(pwd.pw_gid, &grp, &grp_buf[0], grp_buf_sz, &grp_result) && 0 != grp_result) + if (0 == getgrgid_r(pwd.pw_gid, &grp, &grp_buf[0], grp_buf_sz, &grp_result) && nullptr != grp_result) { /* really we should only do this if the group in question is managed by accounts. users * might have accounts installed by hand with a group that's unmanaged. */ diff --git a/paludis/repositories/accounts/passwd_accounts_handler.cc b/paludis/repositories/accounts/passwd_accounts_handler.cc index 15195adc7..f76d5e159 100644 --- a/paludis/repositories/accounts/passwd_accounts_handler.cc +++ b/paludis/repositories/accounts/passwd_accounts_handler.cc @@ -68,7 +68,7 @@ PasswdAccountsHandler::merge_user(const MergeParams & params) username = k->parse_value(); - if (0 != getpwnam(username.c_str())) + if (nullptr != getpwnam(username.c_str())) throw ActionFailedError("User '" + username + "' already exists"); } while (false); @@ -225,7 +225,7 @@ PasswdAccountsHandler::merge_group(const MergeParams & params) groupname = k->parse_value(); - if (0 != getgrnam(groupname.c_str())) + if (nullptr != getgrnam(groupname.c_str())) throw ActionFailedError("Group '" + groupname + "' already exists"); } while (false); diff --git a/paludis/repositories/e/a_finder.cc b/paludis/repositories/e/a_finder.cc index 24611f960..9ecaa0641 100644 --- a/paludis/repositories/e/a_finder.cc +++ b/paludis/repositories/e/a_finder.cc @@ -28,7 +28,7 @@ AFinder::AFinder(const Environment * const e, const std::shared_ptr<const Packag env(e), id(i) { - _labels.push_back(0); + _labels.push_back(nullptr); } void diff --git a/paludis/repositories/e/ebuild/utils/print_exports.cc b/paludis/repositories/e/ebuild/utils/print_exports.cc index a75bd2e6e..b51524a14 100644 --- a/paludis/repositories/e/ebuild/utils/print_exports.cc +++ b/paludis/repositories/e/ebuild/utils/print_exports.cc @@ -25,7 +25,7 @@ extern char ** environ; int main() { - for (char ** it = environ; 0 != *it; ++it) + for (char ** it = environ; nullptr != *it; ++it) { std::string str(*it); std::cout << "export " << str.substr(0, str.find('=')) << std::endl; diff --git a/paludis/repositories/e/eclass_mtimes.cc b/paludis/repositories/e/eclass_mtimes.cc index 2ce163f98..6955171d1 100644 --- a/paludis/repositories/e/eclass_mtimes.cc +++ b/paludis/repositories/e/eclass_mtimes.cc @@ -64,7 +64,7 @@ namespace return & c.files.insert(std::make_pair(e, std::make_pair(f.realpath(), f.stat()))).first->second; } - return 0; + return nullptr; } } diff --git a/paludis/repositories/e/exndbam_repository.cc b/paludis/repositories/e/exndbam_repository.cc index 81116a4de..31b4e0e6c 100644 --- a/paludis/repositories/e/exndbam_repository.cc +++ b/paludis/repositories/e/exndbam_repository.cc @@ -113,7 +113,7 @@ ExndbamRepository::ExndbamRepository(const RepositoryName & n, const ExndbamRepo make_named_values<RepositoryCapabilities>( n::destination_interface() = this, n::environment_variable_interface() = this, - n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0) + n::manifest_interface() = static_cast<RepositoryManifestInterface *>(nullptr) )), _imp(p) { diff --git a/paludis/repositories/e/xml_things_handle.cc b/paludis/repositories/e/xml_things_handle.cc index 983495a93..4c5a9a769 100644 --- a/paludis/repositories/e/xml_things_handle.cc +++ b/paludis/repositories/e/xml_things_handle.cc @@ -55,12 +55,12 @@ namespace paludis CleanupPtr cleanup; Imp() : - paludis_handle(0), - handle(0), - create_glsa_from_xml_file(0), - create_metadata_xml_from_xml_file(0), - init(0), - cleanup(0) + paludis_handle(nullptr), + handle(nullptr), + create_glsa_from_xml_file(nullptr), + create_metadata_xml_from_xml_file(nullptr), + init(nullptr), + cleanup(nullptr) { #if ENABLE_XML if (! getenv_with_default(env_vars::no_xml, "").empty()) @@ -134,7 +134,7 @@ XMLThingsHandle::XMLThingsHandle() : XMLThingsHandle::~XMLThingsHandle() { - if (0 != _imp->cleanup) + if (nullptr != _imp->cleanup) _imp->cleanup(); // don't dlclose, gcc does something dumb on cleanup diff --git a/paludis/repositories/fake/fake_repository.cc b/paludis/repositories/fake/fake_repository.cc index 1c7853420..676897798 100644 --- a/paludis/repositories/fake/fake_repository.cc +++ b/paludis/repositories/fake/fake_repository.cc @@ -51,9 +51,9 @@ namespace paludis FakeRepository::FakeRepository(const FakeRepositoryParams & params) : FakeRepositoryBase(params.environment(), params.name(), make_named_values<RepositoryCapabilities>( - n::destination_interface() = static_cast<RepositoryDestinationInterface *>(0), - n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(0), - n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0) + n::destination_interface() = static_cast<RepositoryDestinationInterface *>(nullptr), + n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(nullptr), + n::manifest_interface() = static_cast<RepositoryManifestInterface *>(nullptr) )), _imp() { diff --git a/paludis/repositories/gemcutter/gemcutter_repository.cc b/paludis/repositories/gemcutter/gemcutter_repository.cc index 6540fdbd4..9585b8343 100644 --- a/paludis/repositories/gemcutter/gemcutter_repository.cc +++ b/paludis/repositories/gemcutter/gemcutter_repository.cc @@ -83,9 +83,9 @@ GemcutterRepository::GemcutterRepository(const GemcutterRepositoryParams & p) : p.environment(), p.name(), make_named_values<RepositoryCapabilities>( - n::destination_interface() = static_cast<RepositoryDestinationInterface *>(0), - n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(0), - n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0) + n::destination_interface() = static_cast<RepositoryDestinationInterface *>(nullptr), + n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(nullptr), + n::manifest_interface() = static_cast<RepositoryManifestInterface *>(nullptr) )), _imp(this, p) { diff --git a/paludis/repositories/gemcutter/json_things_handle.cc b/paludis/repositories/gemcutter/json_things_handle.cc index 5019268d7..e73383080 100644 --- a/paludis/repositories/gemcutter/json_things_handle.cc +++ b/paludis/repositories/gemcutter/json_things_handle.cc @@ -35,8 +35,8 @@ using namespace paludis; using namespace paludis::gemcutter_repository; JSONThingsHandle::JSONThingsHandle() : - handle(0), - parse_all_gems_function(0) + handle(nullptr), + parse_all_gems_function(nullptr) { handle = ::dlopen(("libpaludisgemcutterrepositoryjsonthings_" + stringify(PALUDIS_PC_SLOT) + ".so").c_str(), RTLD_NOW | RTLD_GLOBAL); if (! handle) diff --git a/paludis/repositories/repository/repository_repository.cc b/paludis/repositories/repository/repository_repository.cc index 299888ec3..d510b5951 100644 --- a/paludis/repositories/repository/repository_repository.cc +++ b/paludis/repositories/repository/repository_repository.cc @@ -93,8 +93,8 @@ RepositoryRepository::RepositoryRepository(const RepositoryRepositoryParams & p) p.name(), make_named_values<RepositoryCapabilities>( n::destination_interface() = static_cast<RepositoryDestinationInterface *>(this), - n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(0), - n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0) + n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(nullptr), + n::manifest_interface() = static_cast<RepositoryManifestInterface *>(nullptr) )), _imp(this, p) { diff --git a/paludis/repositories/unavailable/unavailable_repository.cc b/paludis/repositories/unavailable/unavailable_repository.cc index 5be25fdbf..e729ad3a3 100644 --- a/paludis/repositories/unavailable/unavailable_repository.cc +++ b/paludis/repositories/unavailable/unavailable_repository.cc @@ -101,9 +101,9 @@ UnavailableRepository::UnavailableRepository(const UnavailableRepositoryParams & p.environment(), p.name(), make_named_values<RepositoryCapabilities>( - n::destination_interface() = static_cast<RepositoryDestinationInterface *>(0), - n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(0), - n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0) + n::destination_interface() = static_cast<RepositoryDestinationInterface *>(nullptr), + n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(nullptr), + n::manifest_interface() = static_cast<RepositoryManifestInterface *>(nullptr) )), _imp(this, p) { diff --git a/paludis/repositories/unpackaged/installed_repository.cc b/paludis/repositories/unpackaged/installed_repository.cc index 80bc4492d..b0ea4ad62 100644 --- a/paludis/repositories/unpackaged/installed_repository.cc +++ b/paludis/repositories/unpackaged/installed_repository.cc @@ -96,8 +96,8 @@ InstalledUnpackagedRepository::InstalledUnpackagedRepository( const RepositoryName & n, const InstalledUnpackagedRepositoryParams & p) : Repository(p.environment(), n, make_named_values<RepositoryCapabilities>( n::destination_interface() = this, - n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(0), - n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0) + n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(nullptr), + n::manifest_interface() = static_cast<RepositoryManifestInterface *>(nullptr) )), _imp(p) { diff --git a/paludis/repositories/unpackaged/unpackaged_repository.cc b/paludis/repositories/unpackaged/unpackaged_repository.cc index e656f216d..00d2853c9 100644 --- a/paludis/repositories/unpackaged/unpackaged_repository.cc +++ b/paludis/repositories/unpackaged/unpackaged_repository.cc @@ -94,9 +94,9 @@ namespace paludis UnpackagedRepository::UnpackagedRepository(const RepositoryName & n, const UnpackagedRepositoryParams & params) : Repository(params.environment(), n, make_named_values<RepositoryCapabilities>( - n::destination_interface() = static_cast<RepositoryDestinationInterface *>(0), - n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(0), - n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0) + n::destination_interface() = static_cast<RepositoryDestinationInterface *>(nullptr), + n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(nullptr), + n::manifest_interface() = static_cast<RepositoryManifestInterface *>(nullptr) )), _imp(n, params) { diff --git a/paludis/repositories/unwritten/unwritten_repository.cc b/paludis/repositories/unwritten/unwritten_repository.cc index 43717db64..c3ad67879 100644 --- a/paludis/repositories/unwritten/unwritten_repository.cc +++ b/paludis/repositories/unwritten/unwritten_repository.cc @@ -95,9 +95,9 @@ UnwrittenRepository::UnwrittenRepository(const UnwrittenRepositoryParams & p) : p.environment(), p.name(), make_named_values<RepositoryCapabilities>( - n::destination_interface() = static_cast<RepositoryDestinationInterface *>(0), - n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(0), - n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0) + n::destination_interface() = static_cast<RepositoryDestinationInterface *>(nullptr), + n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(nullptr), + n::manifest_interface() = static_cast<RepositoryManifestInterface *>(nullptr) )), _imp(this, p) { |