summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-09-21 14:47:17 -0500
committerDan McGee <dan@archlinux.org>2011-09-22 10:34:07 -0500
commit3e4749fe3ec3f14e4107363a85b953b4a0a747f7 (patch)
tree4bfd27198f0a731be71ce87e50baa8a38c9b269d /src
parent361ed6a6001c41f08ee85a94d28ba5a7c79a6154 (diff)
downloadpacman-3e4749fe3ec3f14e4107363a85b953b4a0a747f7.tar.xz
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>
Diffstat (limited to 'src')
-rw-r--r--src/pacman/util.c2
1 files changed, 1 insertions, 1 deletions
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;
}