74deada5
by Allan McRae at 2024-02-26T03:42:53+00:00
pacman/callback.c: handle empty pkgname
In pacman's progress callback, pkgname being null may result in a
segfault, due to undefined printf behaviour. libalpm always passes
at least an empty string for pkgname, so this situation is largely
avoided.
However, the callback mostly checked for pkgname's being non-null
and not empty. This means a additional space was being added to
the output messages (although with zero actual effect on the output).
Be a bit more robust here by treating null and empty pkgname the
same and fixing the invisible output issue...
Signed-off-by: Allan McRae <allan@archlinux.org>