Fix coverity issue 46/238046/2
authorYoungjae Cho <y0.cho@samsung.com>
Wed, 8 Jul 2020 02:18:09 +0000 (11:18 +0900)
committerYoungjae Cho <y0.cho@samsung.com>
Wed, 8 Jul 2020 02:33:53 +0000 (11:33 +0900)
Change-Id: Ia09f20d916d8128c07aea903dca24a5afa5a562e
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
src/auto-test/brightness.c

index 301ca2b..97d9912 100644 (file)
@@ -318,7 +318,7 @@ static void do_test(const char *tcname)
        ret = vconf_get_int(VCONFKEY_SETAPPL_LCD_TIMEOUT_NORMAL, &timeout);
        if (ret == 0) {
                if (vconf_set_int(VCONFKEY_SETAPPL_LCD_TIMEOUT_NORMAL, 300) < 0)
-                       printf("Failed to set LCDNORMAL timeout.\n");
+                       printf("Failed to set LCDNORMAL timeout, %d.\n", vconf_get_ext_errno());
        }
 
        stop_udev();
@@ -347,8 +347,10 @@ static void do_test(const char *tcname)
        printf("Success: %d, Fail: %d\n", success, fail);
 
        start_udev();
-       if (ret == 0)
-               vconf_set_int(VCONFKEY_SETAPPL_LCD_TIMEOUT_NORMAL, timeout);
+       if (ret == 0) {
+               if (vconf_set_int(VCONFKEY_SETAPPL_LCD_TIMEOUT_NORMAL, timeout) < 0)
+                       printf("Failed to restore LCDNORMAL timeout, %d.\n", vconf_get_ext_errno());
+       }
 }
 
 static void brightness_init(void *data)