aboutsummaryrefslogtreecommitdiff
path: root/util/error.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@redhat.com>2019-03-02 23:38:24 +0100
committerMarkus Armbruster <armbru@redhat.com>2019-03-26 08:10:11 +0100
commit57b7291e90aca93da41b32d264e96d313db87b42 (patch)
treec84fd61553f1f0d7e5e001fa5b2165d309a182bd /util/error.c
parentd132baa05ed7a647067c807fd452ec794cc2ecb7 (diff)
downloadqemu-57b7291e90aca93da41b32d264e96d313db87b42.zip
qemu-57b7291e90aca93da41b32d264e96d313db87b42.tar.gz
qemu-57b7291e90aca93da41b32d264e96d313db87b42.tar.bz2
util/error: Remove an unnecessary NULL check
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é <berrange@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190302223825.11192-2-philmd@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'util/error.c')
-rw-r--r--util/error.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/util/error.c b/util/error.c
index b5ccbd8..934a78e 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);