From cbafcbcc3c689b1137fd102a112e01bf6f67a780 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Thu, 22 Oct 2020 16:40:54 -0700 Subject: [PATCH] remove unused params function old-commit-hash: 94991d9319bb96dd5b481a68afb3dffc1f1bc4f5 --- selfdrive/boardd/panda.cc | 1 - selfdrive/common/params.cc | 8 ++------ selfdrive/common/params.h | 1 - 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/selfdrive/boardd/panda.cc b/selfdrive/boardd/panda.cc index f0d7026db7..ef9b498779 100644 --- a/selfdrive/boardd/panda.cc +++ b/selfdrive/boardd/panda.cc @@ -279,7 +279,6 @@ const char* Panda::get_serial(){ delete[] serial_buf; return NULL; - } void Panda::set_power_saving(bool power_saving){ diff --git a/selfdrive/common/params.cc b/selfdrive/common/params.cc index c89144d496..5be7210578 100644 --- a/selfdrive/common/params.cc +++ b/selfdrive/common/params.cc @@ -62,7 +62,7 @@ static int fsync_dir(const char* path){ goto cleanup; } - cleanup: +cleanup: int result_close = 0; if (fd >= 0){ result_close = close(fd); @@ -237,10 +237,6 @@ cleanup: } int Params::delete_db_value(std::string key) { - return delete_db_value(key.c_str()); -} - -int Params::delete_db_value(const char* key) { int lock_fd = -1; int result; std::string path; @@ -256,7 +252,7 @@ int Params::delete_db_value(const char* key) { } // Delete value. - path = params_path + "/d/" + std::string(key); + path = params_path + "/d/" + key; result = remove(path.c_str()); if (result != 0) { result = ERR_NO_VALUE; diff --git a/selfdrive/common/params.h b/selfdrive/common/params.h index d8c96a8cb2..8da077cfdc 100644 --- a/selfdrive/common/params.h +++ b/selfdrive/common/params.h @@ -33,7 +33,6 @@ public: // Delete a value from the params database. // Inputs are the same as read_db_value, without value and value_sz. int delete_db_value(std::string key); - int delete_db_value(const char* key); // Reads a value from the params database, blocking until successful. // Inputs are the same as read_db_value.