xbps_dbg_printf{,_append}: return if xhp is NULL.
assert() here was totally wrong, better to catch this in all cases (NDEBUG does not change the behaviour).
This commit is contained in:
parent
6cf1555398
commit
feece576b3
@ -56,7 +56,8 @@ xbps_dbg_printf_append(struct xbps_handle *xhp, const char *fmt, ...)
|
|||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
||||||
assert(xhp);
|
if (!xhp)
|
||||||
|
return;
|
||||||
|
|
||||||
if ((xhp->flags & XBPS_FLAG_DEBUG) == 0)
|
if ((xhp->flags & XBPS_FLAG_DEBUG) == 0)
|
||||||
return;
|
return;
|
||||||
@ -71,7 +72,8 @@ xbps_dbg_printf(struct xbps_handle *xhp, const char *fmt, ...)
|
|||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
||||||
assert(xhp);
|
if (!xhp)
|
||||||
|
return;
|
||||||
|
|
||||||
if ((xhp->flags & XBPS_FLAG_DEBUG) == 0)
|
if ((xhp->flags & XBPS_FLAG_DEBUG) == 0)
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user