util/error: Remove an unnecessary NULL check
PATCH 1/1 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.
--- util/error.c | 4 ---- 1 file changed, 4 deletions(-)
util/error.c +0 -4
@@ -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 );
Signature · 1 line
2.17.2
Quoted 8 lines · Philippe Mathieu-Daudé
This NULL check was required while introduced in
680d16dcb79f. Later refactor added a NULL check inerror_setv(), so this check is now redundant.Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- util/error.c | 4 ---- 1 file changed, 4 deletions(-)
Regards,
Daniel
Signature · 3 lines
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
Quoted 5 lines · Philippe Mathieu-Daudé
This NULL check was required while introduced in
680d16dcb79f. Later refactor added a NULL check inerror_setv(), so this check is now redundant.Signed-off-by Philippe Mathieu-Daudé <[email protected]>
Quoted 14 lines · Philippe Mathieu-Daudé
This NULL check was required while introduced in
680d16dcb79f. Later refactor added a NULL check inerror_setv(), so this check is now redundant.Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- util/error.c | 4 ---- 1 file changed, 4 deletions(-)util/error.c +0
-0
util/error.c void error_setg_errno_internal(Error **errp, · line 104
Quoted 2 lines
util/error.c +0
-0@@ -103,10 +103,6 @@ void error_setg_errno_internal(Error **errp,va_list ap;int saved_errno = errno;
Could the saved_errno now be removed, too, since err_setv does that again?
Thomas
Quoted 8 lines
util/error.c +0
-4-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 );
Quoted 10 lines · Thomas Huth
Quoted 9 lines · Philippe Mathieu-Daudé
This NULL check was required while introduced in
680d16dcb79f. Later refactor added a NULL check inerror_setv(), so this check is now redundant.Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- util/error.c | 4 ---- 1 file changed, 4 deletions(-)
Quoted 9 lines
util/error.c void error_setg_errno_internal(Error **errp, · line 104
Quoted 7 lines
util/error.c +0
-0@@ -103,10 +103,6 @@ void error_setg_errno_internal(Error **errp,va_list ap;int saved_errno = errno;Could the
saved_errnonow be removed, too, sinceerr_setvdoes that again?
Yes, good idea, I'll send another patch.
Quoted 14 lines
Thomas
Quoted 8 lines
util/error.c +0
-4-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 );