coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

numfmt: minor improvements to --field parsing


From: Assaf Gordon
Subject: numfmt: minor improvements to --field parsing
Date: Fri, 10 Jul 2015 20:58:32 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

Hello,

attached two small patches:
===
Subject: [PATCH 1/2] numfmt: improve --field parsing, add tests

* src/numfmt.c: parse_field_arg() detect and fail on negative values
  (previously, implicit conversion from signed strtol to unsigned size_t
  failed to detect those); detect and fail on invalid ranges '1-2-3';
  avoid adding superfluous range item for 'N-N' ranges.
* tests/misc/numfmt.pl: test above scenarios, add few more tests for
  better coverage.

Subject: [PATCH 2/2] numfmt: fix coding style

* src/numfmt.c: parse_field_arg(): change whitespace and braces,
   no change in functionality.
===

regards,
 - assaf

Attachment: numfmt-field-parse-arg.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]