From 57b7291e90aca93da41b32d264e96d313db87b42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Sat, 2 Mar 2019 23:38:24 +0100 Subject: [PATCH] util/error: Remove an unnecessary NULL check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This NULL check was required while introduced in 680d16dcb79f. Later refactor added a NULL check in error_setv(), so this check is now redundant. Reviewed-by: Daniel P. Berrangé Reviewed-by: Markus Armbruster Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20190302223825.11192-2-philmd@redhat.com> Signed-off-by: Markus Armbruster --- util/error.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/util/error.c b/util/error.c index b5ccbd8eac..934a78e1b1 100644 --- a/util/error.c +++ b/util/error.c @@ -103,10 +103,6 @@ void error_setg_errno_internal(Error **errp, va_list ap; int saved_errno = errno; - if (errp == NULL) { - return; - } - va_start(ap, fmt); error_setv(errp, src, line, func, ERROR_CLASS_GENERIC_ERROR, fmt, ap, os_errno != 0 ? strerror(os_errno) : NULL);