made POSIX compliant

This commit is contained in:
Celine Mercier
2016-03-21 11:33:06 +01:00
parent 383e738ab7
commit b04b4b5902
8 changed files with 48 additions and 26 deletions

View File

@ -84,7 +84,8 @@ static char* build_obiview_file_name()
char* file_name;
// Build file name
if (asprintf(&file_name, OBIVIEW_FILE_NAME) < 0)
file_name = (char*) malloc((strlen(OBIVIEW_FILE_NAME) + 1)*sizeof(char));
if (sprintf(file_name, OBIVIEW_FILE_NAME) < 0)
{
obi_set_errno(OBIVIEW_ERROR);
obidebug(1, "\nProblem building an obiview file name");
@ -984,7 +985,7 @@ int obi_save_view(Obiview_p view)
return -1;
// Get the full path for the column directory
full_path = get_full_path((view->dms)->dir_fd, view_file_name);
full_path = get_full_path(view->dms, view_file_name);
if (full_path == NULL)
{
obi_set_errno(OBIVIEW_ERROR);