1
0
mirror of https://github.com/moparisthebest/pacman synced 2025-01-10 13:28:12 -05:00

Don't duplicate header strings

There is no need to print them into buffers; we can use the values
returned by gettext() directly without issue.

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2011-09-12 09:55:47 -05:00
parent 4a02350ded
commit a2356d5ae3

View File

@ -740,15 +740,15 @@ static alpm_list_t *create_verbose_header(int install)
alpm_list_t *res = NULL; alpm_list_t *res = NULL;
char *str; char *str;
pm_asprintf(&str, "%s", _("Name")); str = _("Name");
res = alpm_list_add(res, str); res = alpm_list_add(res, str);
pm_asprintf(&str, "%s", _("Old Version")); str = _("Old Version");
res = alpm_list_add(res, str); res = alpm_list_add(res, str);
if(install) { if(install) {
pm_asprintf(&str, "%s", _("New Version")); str = _("New Version");
res = alpm_list_add(res, str); res = alpm_list_add(res, str);
} }
pm_asprintf(&str, "%s", _("Size")); str = _("Size");
res = alpm_list_add(res, str); res = alpm_list_add(res, str);
return res; return res;
@ -867,7 +867,7 @@ out:
FREELIST(lp); FREELIST(lp);
} }
alpm_list_free(targets); alpm_list_free(targets);
FREELIST(header); alpm_list_free(header);
} else { } else {
FREELIST(targets); FREELIST(targets);
} }