[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [coreutils] [PATCH 1/2] sort: avoid unnecessary use of sprintf
From: |
Pádraig Brady |
Subject: |
Re: [coreutils] [PATCH 1/2] sort: avoid unnecessary use of sprintf |
Date: |
Tue, 08 Jun 2010 11:08:20 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 |
On 08/06/10 10:42, Jim Meyering wrote:
> This first patch removes uses of sprintf in favor of
> umaxtostr and stpcpy.
A little less standard, and we don't really care
about performance in --debug, but fair enough.
Note I think you can remove the uintmax_t case from
the umaxtostr parameters.
> It also adjusts some uses of INT_BUFSIZE_BOUND to use
> a variable name rather than a type.
Good one.
>>From 1108856103acec0ed448757ef3ee2f88857432fc Mon Sep 17 00:00:00 2001
> From: Jim Meyering <address@hidden>
> Date: Mon, 7 Jun 2010 07:15:15 +0200
> Subject: [PATCH 2/2] maint: adjust INT_BUFSIZE_BOUND usage for maintainability
>
> * src/tail.c (xlseek): Give INT_BUFSIZE_BOUND a variable name,
> not a type name.
> * src/ls.c (gobble_file, format_user_or_group_width): Likewise.
> * src/head.c (elide_tail_bytes_pipe): Likewise.
> (elide_tail_lines_seekable, main): Likewise.
There may be others?
grep "BOUND ([ilus]" *.c
cheers,
Pádraig.