aboutsummaryrefslogtreecommitdiff
path: root/src/clients
diff options
context:
space:
mode:
Diffstat (limited to 'src/clients')
-rw-r--r--src/clients/cave/cmd_execute_resolution.cc2
-rw-r--r--src/clients/cave/cmd_match.cc8
-rw-r--r--src/clients/cave/cmd_print_id_environment_variable.cc2
-rw-r--r--src/clients/cave/search_extras.cc14
-rw-r--r--src/clients/cave/search_extras_handle.cc16
5 files changed, 21 insertions, 21 deletions
diff --git a/src/clients/cave/cmd_execute_resolution.cc b/src/clients/cave/cmd_execute_resolution.cc
index 9fc1d94d9..6fbc6a14a 100644
--- a/src/clients/cave/cmd_execute_resolution.cc
+++ b/src/clients/cave/cmd_execute_resolution.cc
@@ -1290,7 +1290,7 @@ namespace
else if (initial_state.done)
{
want = false;
- already_done_action(env, "succeeded", job, counts, 0, 0);
+ already_done_action(env, "succeeded", job, counts, nullptr, nullptr);
}
}
diff --git a/src/clients/cave/cmd_match.cc b/src/clients/cave/cmd_match.cc
index 7c13290a0..60b08bb2d 100644
--- a/src/clients/cave/cmd_match.cc
+++ b/src/clients/cave/cmd_match.cc
@@ -73,8 +73,8 @@ namespace
MatchFunction match_function;
ExtrasHandle() :
- handle(0),
- match_function(0)
+ handle(nullptr),
+ match_function(nullptr)
{
handle = ::dlopen(("libcavematchextras_" + stringify(PALUDIS_PC_SLOT) + ".so").c_str(), RTLD_NOW | RTLD_GLOBAL);
if (! handle)
@@ -123,9 +123,9 @@ namespace
bool match_text(const std::string & text, const std::string & pattern, bool case_sensitive)
{
if (case_sensitive)
- return 0 != strstr(text.c_str(), pattern.c_str());
+ return nullptr != strstr(text.c_str(), pattern.c_str());
else
- return 0 != strcasestr(text.c_str(), pattern.c_str());
+ return nullptr != strcasestr(text.c_str(), pattern.c_str());
}
bool match_exact(const std::string & text, const std::string & pattern, bool case_sensitive)
diff --git a/src/clients/cave/cmd_print_id_environment_variable.cc b/src/clients/cave/cmd_print_id_environment_variable.cc
index 487b9d609..ae1bea63d 100644
--- a/src/clients/cave/cmd_print_id_environment_variable.cc
+++ b/src/clients/cave/cmd_print_id_environment_variable.cc
@@ -99,7 +99,7 @@ namespace
{
auto repo(env->fetch_repository(id->repository_name()));
- if (0 != repo->environment_variable_interface())
+ if (nullptr != repo->environment_variable_interface())
{
std::shared_ptr<Map<char, std::string> > m(std::make_shared<Map<char, std::string>>());
m->insert('n', n);
diff --git a/src/clients/cave/search_extras.cc b/src/clients/cave/search_extras.cc
index 96f3c43f7..68957dfa9 100644
--- a/src/clients/cave/search_extras.cc
+++ b/src/clients/cave/search_extras.cc
@@ -36,7 +36,7 @@ cave_search_extras_create_db(const std::string & file)
{
auto data(cave_search_extras_open_db(file));
- if (SQLITE_OK != sqlite3_exec(data->db, "drop table if exists candidates", 0, 0, 0))
+ if (SQLITE_OK != sqlite3_exec(data->db, "drop table if exists candidates", nullptr, nullptr, nullptr))
throw InternalError(PALUDIS_HERE, "sqlite3_exec drop candidates failed");
if (SQLITE_OK != sqlite3_exec(data->db, "create table candidates ( "
@@ -47,13 +47,13 @@ cave_search_extras_create_db(const std::string & file)
"name text not null, "
"short_desc text not null, "
"long_desc text not null"
- ")", 0, 0, 0))
+ ")", nullptr, nullptr, nullptr))
throw InternalError(PALUDIS_HERE, "sqlite3_exec create candidates failed");
if (SQLITE_OK != sqlite3_prepare_v2(data->db, "insert into candidates "
"( spec, is_visible, is_best, is_best_visible, name, short_desc, long_desc ) "
"values ( ?1, ?2, ?3, ?4, ?5, ?6, ?7 )",
- -1, &data->add_candidate, 0))
+ -1, &data->add_candidate, nullptr))
throw InternalError(PALUDIS_HERE, "sqlite3_prepare_v2 insert into candidates failed");
return data;
@@ -66,7 +66,7 @@ cave_search_extras_open_db(const std::string & file)
if (SQLITE_OK != sqlite3_open(file.c_str(), &data->db))
throw InternalError(PALUDIS_HERE, "sqlite3_open failed");
- data->add_candidate = 0;
+ data->add_candidate = nullptr;
return data;
}
@@ -123,7 +123,7 @@ extern "C"
void
cave_search_extras_starting_adds(CaveSearchExtrasDB * const data)
{
- if (SQLITE_OK != sqlite3_exec(data->db, "begin", 0, 0, 0))
+ if (SQLITE_OK != sqlite3_exec(data->db, "begin", nullptr, nullptr, nullptr))
throw InternalError(PALUDIS_HERE, "sqlite3_exec begin failed");
}
@@ -131,7 +131,7 @@ extern "C"
void
cave_search_extras_done_adds(CaveSearchExtrasDB * const data)
{
- if (SQLITE_OK != sqlite3_exec(data->db, "commit", 0, 0, 0))
+ if (SQLITE_OK != sqlite3_exec(data->db, "commit", nullptr, nullptr, nullptr))
throw InternalError(PALUDIS_HERE, "sqlite3_exec commit failed");
}
@@ -176,7 +176,7 @@ cave_search_extras_find_candidates(CaveSearchExtrasDB * const data,
}
int code;
- if (SQLITE_OK != ((code = sqlite3_prepare_v2(data->db, ("select spec from candidates where " + s + " = 1" + h).c_str(), -1, &find_candidates, 0))))
+ if (SQLITE_OK != ((code = sqlite3_prepare_v2(data->db, ("select spec from candidates where " + s + " = 1" + h).c_str(), -1, &find_candidates, nullptr))))
throw InternalError(PALUDIS_HERE, "sqlite3_prepare_v2 select from candidates failed:" + stringify(code));
if (! p1.empty())
diff --git a/src/clients/cave/search_extras_handle.cc b/src/clients/cave/search_extras_handle.cc
index 95c06baea..7cbf66432 100644
--- a/src/clients/cave/search_extras_handle.cc
+++ b/src/clients/cave/search_extras_handle.cc
@@ -38,14 +38,14 @@ using namespace paludis;
using namespace cave;
SearchExtrasHandle::SearchExtrasHandle() :
- handle(0),
- create_db_function(0),
- open_db_function(0),
- cleanup_db_function(0),
- starting_adds_function(0),
- add_candidate_function(0),
- done_adds_function(0),
- find_candidates_function(0)
+ handle(nullptr),
+ create_db_function(nullptr),
+ open_db_function(nullptr),
+ cleanup_db_function(nullptr),
+ starting_adds_function(nullptr),
+ add_candidate_function(nullptr),
+ done_adds_function(nullptr),
+ find_candidates_function(nullptr)
{
#ifndef ENABLE_SEARCH_INDEX
throw NotAvailableError("cave was built without support for search indexes");