summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/chgrp.c3
-rw-r--r--src/chown.c3
-rw-r--r--src/cp.c2
-rw-r--r--src/dd.c2
-rw-r--r--src/df.c2
-rw-r--r--src/dircolors.c3
-rw-r--r--src/du.c5
-rw-r--r--src/install.c2
-rw-r--r--src/ln.c5
-rw-r--r--src/ls.c2
-rw-r--r--src/mkdir.c2
-rw-r--r--src/mkfifo.c2
-rw-r--r--src/mknod.c2
-rw-r--r--src/mv.c3
-rw-r--r--src/rm.c2
-rw-r--r--src/rmdir.c2
-rw-r--r--src/touch.c3
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)
{
diff --git a/src/cp.c b/src/cp.c
index 7e3489158..3ec93b7d1 100644
--- a/src/cp.c
+++ b/src/cp.c
@@ -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)
{
diff --git a/src/dd.c b/src/dd.c
index 5ce8427c2..869477a2b 100644
--- a/src/dd.c
+++ b/src/dd.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)
{
diff --git a/src/df.c b/src/df.c
index 2641d0f15..6547fc8bf 100644
--- a/src/df.c
+++ b/src/df.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. */
diff --git a/src/du.c b/src/du.c
index 3b9f8226a..efbd49dce 100644
--- a/src/du.c
+++ b/src/du.c
@@ -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)
{
diff --git a/src/ln.c b/src/ln.c
index 62b4e8ef6..cdf8e8b0a 100644
--- a/src/ln.c
+++ b/src/ln.c
@@ -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)
{
diff --git a/src/ls.c b/src/ls.c
index aae67d557..e906335a0 100644
--- a/src/ls.c
+++ b/src/ls.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)
{
diff --git a/src/mv.c b/src/mv.c
index 7b81c005f..5558b921a 100644
--- a/src/mv.c
+++ b/src/mv.c
@@ -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)
{
diff --git a/src/rm.c b/src/rm.c
index 6789c2447..53325b38c 100644
--- a/src/rm.c
+++ b/src/rm.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)
{