diff options
-rw-r--r-- | src/chgrp.c | 3 | ||||
-rw-r--r-- | src/chown.c | 3 | ||||
-rw-r--r-- | src/cp.c | 2 | ||||
-rw-r--r-- | src/dd.c | 2 | ||||
-rw-r--r-- | src/df.c | 2 | ||||
-rw-r--r-- | src/dircolors.c | 3 | ||||
-rw-r--r-- | src/du.c | 5 | ||||
-rw-r--r-- | src/install.c | 2 | ||||
-rw-r--r-- | src/ln.c | 5 | ||||
-rw-r--r-- | src/ls.c | 2 | ||||
-rw-r--r-- | src/mkdir.c | 2 | ||||
-rw-r--r-- | src/mkfifo.c | 2 | ||||
-rw-r--r-- | src/mknod.c | 2 | ||||
-rw-r--r-- | src/mv.c | 3 | ||||
-rw-r--r-- | src/rm.c | 2 | ||||
-rw-r--r-- | src/rmdir.c | 2 | ||||
-rw-r--r-- | src/touch.c | 3 |
17 files changed, 19 insertions, 26 deletions
diff --git a/src/chgrp.c b/src/chgrp.c index 97374ceea..40a1dc14b 100644 --- a/src/chgrp.c +++ b/src/chgrp.c @@ -306,8 +306,7 @@ main (int argc, char **argv) recurse = force_silent = verbose = changes_only = 0; - while ((optc = getopt_long (argc, argv, "Rcfhv", long_options, (int *) 0)) - != EOF) + while ((optc = getopt_long (argc, argv, "Rcfhv", long_options, NULL)) != -1) { switch (optc) { diff --git a/src/chown.c b/src/chown.c index bd10f7ff4..9663cd17e 100644 --- a/src/chown.c +++ b/src/chown.c @@ -272,8 +272,7 @@ main (int argc, char **argv) recurse = force_silent = verbose = changes_only = 0; - while ((optc = getopt_long (argc, argv, "Rcfhv", long_options, (int *) 0)) - != EOF) + while ((optc = getopt_long (argc, argv, "Rcfhv", long_options, NULL)) != -1) { switch (optc) { @@ -250,7 +250,7 @@ main (int argc, char **argv) umask_kill = 0777777 ^ umask (0); while ((c = getopt_long (argc, argv, "abdfilprsuvxPRS:V:", long_opts, - (int *) 0)) != EOF) + NULL)) != -1) { switch (c) { @@ -809,7 +809,7 @@ scanargs (int argc, char **argv) int i, n; int c; - while ((c = getopt_long (argc, argv, "", long_options, (int *) 0)) != EOF) + while ((c = getopt_long (argc, argv, "", long_options, NULL)) != -1) { switch (c) { @@ -611,7 +611,7 @@ main (int argc, char **argv) exit_status = 0; while ((i = getopt_long (argc, argv, "aiF:hkmPTt:vx:", long_options, NULL)) - != EOF) + != -1) { switch (i) { diff --git a/src/dircolors.c b/src/dircolors.c index 2eac1920d..18fb4ee61 100644 --- a/src/dircolors.c +++ b/src/dircolors.c @@ -424,8 +424,7 @@ main (int argc, char **argv) parse_long_options (argc, argv, "dircolors", GNU_PACKAGE, VERSION, usage); - while ((optc = getopt_long (argc, argv, "bcp", long_options, NULL)) - != EOF) + while ((optc = getopt_long (argc, argv, "bcp", long_options, NULL)) != -1) switch (optc) { case 'b': /* Bourne shell syntax. */ @@ -268,9 +268,8 @@ main (int argc, char **argv) else output_size = size_kilobytes; - while ((c = getopt_long (argc, argv, "abchklmsxDLS", long_options, - (int *) 0)) - != EOF) + while ((c = getopt_long (argc, argv, "abchklmsxDLS", long_options, NULL)) + != -1) { switch (c) { diff --git a/src/install.c b/src/install.c index e92cc83e3..23d2ebf60 100644 --- a/src/install.c +++ b/src/install.c @@ -204,7 +204,7 @@ main (int argc, char **argv) version = getenv ("VERSION_CONTROL"); while ((optc = getopt_long (argc, argv, "bcsdg:m:o:V:S:", long_options, - (int *) 0)) != EOF) + NULL)) != -1) { switch (optc) { @@ -371,9 +371,8 @@ main (int argc, char **argv) = hard_dir_link = 0; errors = 0; - while ((c = getopt_long (argc, argv, - "bdfinsvFS:V:", long_options, (int *) 0)) - != EOF) + while ((c = getopt_long (argc, argv, "bdfinsvFS:V:", long_options, NULL)) + != -1) { switch (c) { @@ -866,7 +866,7 @@ decode_switches (int argc, char **argv) while ((c = getopt_long (argc, argv, "abcdfgiklmnopqrstuw:xABCDFGI:LNQRST:UX1", - long_options, (int *) 0)) != EOF) + long_options, NULL)) != -1) { switch (c) { diff --git a/src/mkdir.c b/src/mkdir.c index 9f1ae187f..3c12625b7 100644 --- a/src/mkdir.c +++ b/src/mkdir.c @@ -89,7 +89,7 @@ main (int argc, char **argv) path_mode = 0; - while ((optc = getopt_long (argc, argv, "pm:", longopts, (int *) 0)) != EOF) + while ((optc = getopt_long (argc, argv, "pm:", longopts, NULL)) != -1) { switch (optc) { diff --git a/src/mkfifo.c b/src/mkfifo.c index 458ec9f71..5243b6477 100644 --- a/src/mkfifo.c +++ b/src/mkfifo.c @@ -90,7 +90,7 @@ main (int argc, char **argv) #ifndef S_ISFIFO error (4, 0, _("fifo files not supported")); #else - while ((optc = getopt_long (argc, argv, "m:", longopts, (int *) 0)) != EOF) + while ((optc = getopt_long (argc, argv, "m:", longopts, NULL)) != -1) { switch (optc) { diff --git a/src/mknod.c b/src/mknod.c index f3cb25a71..a39b653ec 100644 --- a/src/mknod.c +++ b/src/mknod.c @@ -99,7 +99,7 @@ main (int argc, char **argv) symbolic_mode = NULL; - while ((optc = getopt_long (argc, argv, "m:", longopts, (int *) 0)) != EOF) + while ((optc = getopt_long (argc, argv, "m:", longopts, NULL)) != -1) { switch (optc) { @@ -431,8 +431,7 @@ main (int argc, char **argv) interactive = override_mode = verbose = update = 0; errors = 0; - while ((c = getopt_long (argc, argv, "bfiuvS:V:", long_options, (int *) 0)) - != EOF) + while ((c = getopt_long (argc, argv, "bfiuvS:V:", long_options, NULL)) != -1) { switch (c) { @@ -126,7 +126,7 @@ main (int argc, char **argv) pnsize = 256; pathname = xmalloc (pnsize); - while ((c = getopt_long (argc, argv, "dfirvR", long_opts, (int *) 0)) != EOF) + while ((c = getopt_long (argc, argv, "dfirvR", long_opts, NULL)) != -1) { switch (c) { diff --git a/src/rmdir.c b/src/rmdir.c index 513575ab8..0b4108d02 100644 --- a/src/rmdir.c +++ b/src/rmdir.c @@ -109,7 +109,7 @@ main (int argc, char **argv) empty_paths = 0; - while ((optc = getopt_long (argc, argv, "p", longopts, (int *) 0)) != EOF) + while ((optc = getopt_long (argc, argv, "p", longopts, NULL)) != -1) { switch (optc) { diff --git a/src/touch.c b/src/touch.c index be49942ff..3855f5766 100644 --- a/src/touch.c +++ b/src/touch.c @@ -279,8 +279,7 @@ main (int argc, char **argv) change_times = no_create = use_ref = posix_date = flexible_date = 0; newtime = (time_t) -1; - while ((c = getopt_long (argc, argv, "acd:fmr:t:", longopts, (int *) 0)) - != EOF) + while ((c = getopt_long (argc, argv, "acd:fmr:t:", longopts, NULL)) != -1) { switch (c) { |