diff options
author | Jim Meyering <jim@meyering.net> | 1996-12-14 05:22:46 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1996-12-14 05:22:46 +0000 |
commit | 8c5b30bc1e6d0953e27d05a698cb1413256ae49e (patch) | |
tree | 017baf48d0569ace77aa9c764aae81301a0a76cf /src | |
parent | f0fa287b4f4e0461bc5999748b72fa1f8c25bdd4 (diff) | |
download | coreutils-8c5b30bc1e6d0953e27d05a698cb1413256ae49e.tar.xz |
(get_format_width, get_format_prec): Avoid
unnecessary comparison of digit to '\0'.
Diffstat (limited to 'src')
-rw-r--r-- | src/csplit.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/csplit.c b/src/csplit.c index e3de13a0f..12862c815 100644 --- a/src/csplit.c +++ b/src/csplit.c @@ -1306,9 +1306,8 @@ get_format_width (char **format_ptr) int ch_save; start = *format_ptr; - for (; **format_ptr; (*format_ptr)++) - if (!ISDIGIT (**format_ptr)) - break; + for (; ISDIGIT (**format_ptr); (*format_ptr)++) + continue; ch_save = **format_ptr; **format_ptr = '\0'; @@ -1344,9 +1343,8 @@ get_format_prec (char **format_ptr) } start = *format_ptr; - for (; **format_ptr; (*format_ptr)++) - if (!ISDIGIT (**format_ptr)) - break; + for (; ISDIGIT (**format_ptr); (*format_ptr)++) + continue; /* ANSI 4.9.6.1 says that if the precision is negative, it's as good as not there. */ |