From: Jaeyun Date: Thu, 23 Jan 2020 08:00:37 +0000 (+0900) Subject: [Build/Android] remove unnecessary log to run android X-Git-Tag: v1.3.0~21 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4a1996cd7eb4a96fa8014d5b372a90c55521c66d;p=platform%2Fupstream%2Fnnstreamer.git [Build/Android] remove unnecessary log to run android Currently android library does not use the configuration file. Check null string before validating the conf file. Signed-off-by: Jaeyun Jung --- diff --git a/gst/nnstreamer/nnstreamer_conf.c b/gst/nnstreamer/nnstreamer_conf.c index d44176f..f73d6dc 100644 --- a/gst/nnstreamer/nnstreamer_conf.c +++ b/gst/nnstreamer/nnstreamer_conf.c @@ -317,7 +317,7 @@ nnsconf_loadconf (gboolean force_reload) #ifndef __TIZEN__ /** if it's not Tizen, configuration from env-var has a higher priority */ conf.conffile = _strdup_getenv (NNSTREAMER_ENVVAR_CONF_FILE); - if (!g_file_test (conf.conffile, G_FILE_TEST_IS_REGULAR)) { + if (conf.conffile && !g_file_test (conf.conffile, G_FILE_TEST_IS_REGULAR)) { g_free (conf.conffile); conf.conffile = NULL; } @@ -350,14 +350,6 @@ nnsconf_loadconf (gboolean force_reload) } } - if (conf.conffile == NULL) { - /** - * Failed to get the configuration. - * Note that Android API does not use the configuration. - */ - g_warning ("Failed to load the configuration, no config file found."); - } - if (conf.conffile) { key_file = g_key_file_new (); g_assert (key_file != NULL); @@ -387,6 +379,12 @@ nnsconf_loadconf (gboolean force_reload) } g_key_file_free (key_file); + } else { + /** + * Failed to get the configuration. + * Note that Android API does not use the configuration. + */ + g_warning ("Failed to load the configuration, no config file found."); } for (t = 0; t < NNSCONF_PATH_END; t++) {