From 86cf4e5d7be0cdbdb51149c9b8fe9ea6e3e3d694 Mon Sep 17 00:00:00 2001 From: Christopher Michael Date: Tue, 12 Mar 2019 09:57:33 -0400 Subject: [PATCH] elm_config: Fix unchecked return value 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 Reviewed-by: Marcel Hollerbach Differential Revision: https://phab.enlightenment.org/D8309 --- src/lib/elementary/elm_config.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/elementary/elm_config.c b/src/lib/elementary/elm_config.c index a6d943e356..a88d62503e 100644 --- a/src/lib/elementary/elm_config.c +++ b/src/lib/elementary/elm_config.c @@ -779,7 +779,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