From e4b21a04531cd36eabbac66d97e8115a2044f30d Mon Sep 17 00:00:00 2001 From: Sebastian Ramacher Date: Sat, 30 Nov 2019 15:03:22 +0100 Subject: [PATCH] Simplify --- zathura/content-type.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/zathura/content-type.c b/zathura/content-type.c index ecc9624..842b74f 100644 --- a/zathura/content-type.c +++ b/zathura/content-type.c @@ -1,7 +1,6 @@ /* SPDX-License-Identifier: Zlib */ #include "content-type.h" -#include "macros.h" #include #ifdef WITH_MAGIC @@ -138,8 +137,8 @@ guess_type_file(const char* path) G_SPAWN_SEARCH_PATH | G_SPAWN_STDERR_TO_DEV_NULL, NULL, NULL, &out, NULL, &ret, &error); g_free(argv[3]); - if (r == false || error != NULL) { - girara_warning("failed to execute command: %s", error ? error->message : "unknown"); + if (r == false) { + girara_warning("failed to execute command: %s", error->message); g_error_free(error); g_free(out); return NULL;