- Silence Coverity warning in platform_linux.c

- Don't do settings lookup when calling runloop_msg_queue_push
This commit is contained in:
twinaphex 2017-01-03 18:47:34 +01:00
parent faf939856b
commit b13d069578
3 changed files with 3 additions and 7 deletions

View File

@ -807,8 +807,7 @@ static void check_proc_acpi_sysfs_battery(const char *node,
*percent = capacity;
end:
if (buf)
free(buf);
free(buf);
buf = NULL;
}

View File

@ -2101,7 +2101,8 @@ void video_driver_frame(const void *data, unsigned width,
video_driver_msg[0] = '\0';
if (runloop_ctl(RUNLOOP_CTL_MSG_QUEUE_PULL, &msg) && msg)
if (runloop_ctl(RUNLOOP_CTL_MSG_QUEUE_PULL, &msg)
&& settings->video.font_enable && msg)
strlcpy(video_driver_msg, msg, sizeof(video_driver_msg));
if (!current_video || !current_video->frame(

View File

@ -146,10 +146,6 @@ void runloop_msg_queue_push(const char *msg,
bool flush)
{
runloop_ctx_msg_info_t msg_info;
settings_t *settings = config_get_ptr();
if (!settings || !settings->video.font_enable)
return;
#ifdef HAVE_THREADS
slock_lock(_runloop_msg_queue_lock);