1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-22 15:58:50 -05:00

Fix signature printing in package info

pm_asprintf() does not return a length as asprintf() does. Fail. Make
sure it is not -1 as that is the only failure condition.

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2011-09-21 14:47:17 -05:00
parent 361ed6a600
commit 3e4749fe3e

View File

@ -729,7 +729,7 @@ void signature_display(const char *title, alpm_siglist_t *siglist)
name = result->key.uid ? result->key.uid : result->key.fingerprint;
ret = pm_asprintf(&sigline, _("%s, %s from \"%s\""),
status, validity, name);
if(ret < 1) {
if(ret == -1) {
pm_fprintf(stderr, ALPM_LOG_ERROR, _("failed to allocate string\n"));
continue;
}