From 3e4749fe3ec3f14e4107363a85b953b4a0a747f7 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 21 Sep 2011 14:47:17 -0500 Subject: 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 --- src/pacman/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pacman/util.c b/src/pacman/util.c index 05873c99..a566f4a7 100644 --- a/src/pacman/util.c +++ b/src/pacman/util.c @@ -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; } -- cgit v1.2.3-24-g4f1b