diff options
author | Jim Meyering <jim@meyering.net> | 2002-11-10 10:23:41 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2002-11-10 10:23:41 +0000 |
commit | 20282f499287003e4d435d181b65e799ac8bdd25 (patch) | |
tree | 4a6f5b3e7b97b98edeba8a590e1e9e72520bee67 /src | |
parent | 8988c3acb35e8e8f81dc6035877ba0bc332a58ba (diff) | |
download | coreutils-20282f499287003e4d435d181b65e799ac8bdd25.tar.xz |
(main): Also declare `i' to be unsigned, not int.
Diffstat (limited to 'src')
-rw-r--r-- | src/sort.c | 37 |
1 files changed, 21 insertions, 16 deletions
diff --git a/src/sort.c b/src/sort.c index 9ef109381..456dc37cf 100644 --- a/src/sort.c +++ b/src/sort.c @@ -2158,7 +2158,6 @@ main (int argc, char **argv) struct keyfield *key; struct keyfield gkey; char const *s; - int i; int c = 0; int checkonly = 0, mergeonly = 0, nfiles = 0; int posix_pedantic = (getenv ("POSIXLY_CORRECT") != NULL); @@ -2213,26 +2212,32 @@ main (int argc, char **argv) xmemcoll_exit_failure = SORT_FAILURE; #ifdef SA_NOCLDSTOP - sigemptyset (&caught_signals); - for (i = 0; i < nsigs; i++) - sigaddset (&caught_signals, sigs[i]); - newact.sa_handler = sighandler; - newact.sa_mask = caught_signals; - newact.sa_flags = 0; + { + unsigned i; + sigemptyset (&caught_signals); + for (i = 0; i < nsigs; i++) + sigaddset (&caught_signals, sigs[i]); + newact.sa_handler = sighandler; + newact.sa_mask = caught_signals; + newact.sa_flags = 0; + } #endif - for (i = 0; i < nsigs; i++) - { - int sig = sigs[i]; + { + unsigned i; + for (i = 0; i < nsigs; i++) + { + int sig = sigs[i]; #ifdef SA_NOCLDSTOP - sigaction (sig, NULL, &oldact); - if (oldact.sa_handler != SIG_IGN) - sigaction (sig, &newact, NULL); + sigaction (sig, NULL, &oldact); + if (oldact.sa_handler != SIG_IGN) + sigaction (sig, &newact, NULL); #else - if (signal (sig, SIG_IGN) != SIG_IGN) - signal (sig, sighandler); + if (signal (sig, SIG_IGN) != SIG_IGN) + signal (sig, sighandler); #endif - } + } + } gkey.sword = gkey.eword = -1; gkey.ignore = NULL; |