Commit 3f9dcee5 authored by Laurent THOMAS's avatar Laurent THOMAS Committed by calvin_peyron

remove a dead function

parent 7d70617a
...@@ -25,52 +25,6 @@ ...@@ -25,52 +25,6 @@
#include "common/utils/mem/oai_memory.h" #include "common/utils/mem/oai_memory.h"
#include "common/utils/LOG/log.h" #include "common/utils/LOG/log.h"
/****************************************************************************
** **
** Name: memory_get_path() **
** **
** Description: Gets the absolute path of the file where non-volatile **
** data are located **
** **
** Inputs: dirname: The directory where data file is located **
** filename: The name of the data file **
** Others: None **
** **
** Outputs: None **
** Return: The absolute path of the non-volatile data **
** file. The returned value is a dynamically **
** allocated octet string that needs to be **
** freed after usage. **
** Others: None **
** **
***************************************************************************/
char* memory_get_path(const char* dirname, const char* filename)
{
/* Get non-volatile data directory */
const char* path = getenv(dirname);
if (path == NULL) {
path = getenv(DEFAULT_NAS_PATH);
}
if (path == NULL) {
path = ".";
}
/* Append non-volatile data file name */
size_t size = strlen(path) + strlen(filename) + 1;
char* data_filename = (char*)malloc(size + 1);
if (data_filename != NULL) {
if (size != sprintf(data_filename, "%s/%s", path, filename)) {
free(data_filename);
return NULL;
}
}
return data_filename;
}
char* memory_get_path_from_ueid(const char* dirname, const char* filename, int ueid) char* memory_get_path_from_ueid(const char* dirname, const char* filename, int ueid)
{ {
/* Get non-volatile data directory */ /* Get non-volatile data directory */
......
...@@ -35,8 +35,6 @@ typedef unsigned char uint8_t; ...@@ -35,8 +35,6 @@ typedef unsigned char uint8_t;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
char* memory_get_path(const char* dirname, const char* filename);
char* memory_get_path_from_ueid(const char* dirname, const char* filename, int ueid); char* memory_get_path_from_ueid(const char* dirname, const char* filename, int ueid);
int memory_read(const char* datafile, void* data, size_t size); int memory_read(const char* datafile, void* data, size_t size);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment