On Mon, Feb 21, 2011 at 1:02 PM, Jakob Gruber <[email protected]> wrote:
> Printing the exact size seems to make more sense for scripting contexts
> and allows us to get rid of the direct call to
> size_to_human_string_format.
Agreed.

Signed-off-by: Dan McGee <[email protected]>

> Signed-off-by: Jakob Gruber <[email protected]>
> ---
>  src/pacman/util.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/pacman/util.c b/src/pacman/util.c
> index b651478..8903d61 100644
> --- a/src/pacman/util.c
> +++ b/src/pacman/util.c
> @@ -703,7 +703,7 @@ void print_packages(const alpm_list_t *packages)
>                /* %s : size */
>                if(strstr(temp,"%s")) {
>                        char *size;
> -                       size = size_to_human_string_format(pkg_get_size(pkg), 
> "%.2f", "M", 0);
> +                       pm_asprintf(&size, "%u", pkg_get_size(pkg));
>                        string = strreplace(temp, "%s", size);
>                        free(size);
>                        free(temp);
> --
> 1.7.4.1
>
>
>

Reply via email to