xbps_dbg_printf{,_append}: add assertion

This commit is contained in:
Juan RP 2020-01-06 12:10:47 +01:00
parent 9be9679b5d
commit 802a6eae09
No known key found for this signature in database
GPG Key ID: AF19F6CB482F9368

View File

@ -56,6 +56,8 @@ xbps_dbg_printf_append(struct xbps_handle *xhp, const char *fmt, ...)
{ {
va_list ap; va_list ap;
assert(xhp);
if ((xhp->flags & XBPS_FLAG_DEBUG) == 0) if ((xhp->flags & XBPS_FLAG_DEBUG) == 0)
return; return;
@ -69,6 +71,8 @@ xbps_dbg_printf(struct xbps_handle *xhp, const char *fmt, ...)
{ {
va_list ap; va_list ap;
assert(xhp);
if ((xhp->flags & XBPS_FLAG_DEBUG) == 0) if ((xhp->flags & XBPS_FLAG_DEBUG) == 0)
return; return;