elm: fix dereferencing issue and add error handling and remove unreachable codes.
Summary: I had fixed dereferencing issue and added chmod error handling(elm_code_file) I had removed unreachable codes which remains after changing arguments initiallization(efl_ui_win) Test Plan: Run unit test cases Reviewers: eagleeye, Jaehyun_Cho, Hermet, zmike Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7816
This commit is contained in:
parent
40cc1aca0d
commit
f4e5948c0f
|
@ -4886,11 +4886,6 @@ _create_indicator(Evas_Object *obj)
|
||||||
const char *indicator_serv_name;
|
const char *indicator_serv_name;
|
||||||
|
|
||||||
indicator_serv_name = "elm_indicator_portrait";
|
indicator_serv_name = "elm_indicator_portrait";
|
||||||
if (!indicator_serv_name)
|
|
||||||
{
|
|
||||||
ERR("Conformant cannot get portrait indicator service name");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
indicator = elm_plug_add(obj);
|
indicator = elm_plug_add(obj);
|
||||||
if (!indicator)
|
if (!indicator)
|
||||||
|
|
|
@ -121,6 +121,8 @@ EAPI Elm_Code_File *elm_code_file_new(Elm_Code *code)
|
||||||
|
|
||||||
EAPI Elm_Code_File *elm_code_file_open(Elm_Code *code, const char *path)
|
EAPI Elm_Code_File *elm_code_file_open(Elm_Code *code, const char *path)
|
||||||
{
|
{
|
||||||
|
EINA_SAFETY_ON_NULL_RETURN_VAL(code, NULL);
|
||||||
|
|
||||||
Elm_Code_File *ret;
|
Elm_Code_File *ret;
|
||||||
Eina_File *file;
|
Eina_File *file;
|
||||||
Eina_File_Line *line;
|
Eina_File_Line *line;
|
||||||
|
@ -214,7 +216,13 @@ EAPI void elm_code_file_save(Elm_Code_File *file)
|
||||||
free(tmp);
|
free(tmp);
|
||||||
|
|
||||||
if (have_mode)
|
if (have_mode)
|
||||||
chmod(path, mode);
|
{
|
||||||
|
if(chmod(path, mode) < 0)
|
||||||
|
{
|
||||||
|
ERR("Error in chmod(%s, %s) - %d(%s)\n", path, mode, errno, strerror(errno));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (file->parent)
|
if (file->parent)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue