]> git.proxmox.com Git - mirror_qemu.git/commitdiff
util/error: Remove an unnecessary NULL check
authorPhilippe Mathieu-Daudé <philmd@redhat.com>
Sat, 2 Mar 2019 22:38:24 +0000 (23:38 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Tue, 26 Mar 2019 07:10:11 +0000 (08:10 +0100)
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>
util/error.c

index b5ccbd8eac637b948cea5626415d8036508fc21d..934a78e1b11a56b380f3613a6ed35f2559d5af94 100644 (file)
@@ -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);