coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] seq cleanup


From: Pádraig Brady
Subject: Re: [PATCH] seq cleanup
Date: Sun, 02 Dec 2012 13:42:00 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1

On 12/01/2012 06:55 PM, Dmitry Bogatov wrote:
Here is simple patch that allow reduce indentation in `print_numbers`
in `seq.c` by one level to improve readability.

--
Best regards, Dmitry Bogatov<address@hidden>,
        GNU Thales maintainer and netiquette guardian.
GPG: D1E0591E0037BDCCBEE56002788BE01254B7F00D

diff --git a/src/seq.c b/src/seq.c
index 9c2c51f..01b5927 100644
--- a/src/seq.c
+++ b/src/seq.c
@@ -256,60 +256,61 @@ print_numbers (char const *fmt, struct layout layout,
  {
    bool out_of_range = (step < 0 ? first < last : last < first);

-  if (! out_of_range)
-    {

+  if (out_of_range)
+    return;

This seems a bit marginal TBH.
Less indentation is good, but multiple return points is less so.
I'd apply it if it reduced line wrapping, but it doesn't.

thanks,
Pádraig.



reply via email to

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