elm_config: Fix unchecked return value
authorChristopher Michael <cp.michael@samsung.com>
Tue, 12 Mar 2019 13:57:33 +0000 (09:57 -0400)
committerYeongjong Lee <yj34.lee@samsung.com>
Tue, 2 Apr 2019 03:45:17 +0000 (12:45 +0900)
Small patch to check the return value of ecore_file_cp. Coverity
reports this as an unchecked return value, so let's just add a simple
check here.

Fixes Coverity CID1399101

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8309

src/lib/elementary/elm_config.c

index 2e34c25..088a5f6 100644 (file)
@@ -877,7 +877,8 @@ _elm_config_profile_derived_save(const char *profile, Elm_Config_Derived *derive
         eet_close(ef);
         if (ret)
           {
-             ecore_file_cp(buf, buf2);
+             if (!ecore_file_cp(buf, buf2))
+               ERR("Error saving Elementary's derived configuration profile file");
              ecore_file_unlink(buf);
           }
         else