summaryrefslogtreecommitdiff
path: root/src/env.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1997-02-01 03:05:36 +0000
committerJim Meyering <jim@meyering.net>1997-02-01 03:05:36 +0000
commitb8c82a8e39e901c6b231217a009982a0e0b782a6 (patch)
treeea1086eb40e509ef40ba21c407285ae847e263de /src/env.c
parent4f51b86bfb737aadf750d70b6a7bd4e0ec36962f (diff)
downloadcoreutils-b8c82a8e39e901c6b231217a009982a0e0b782a6.tar.xz
Compare getopt_long return value against -1, not EOF. Use NULL, not '(int *) 0' as last parameter in getopt_long call.
Diffstat (limited to 'src/env.c')
-rw-r--r--src/env.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/env.c b/src/env.c
index 86d00d795..c6c8ab60d 100644
--- a/src/env.c
+++ b/src/env.c
@@ -122,7 +122,7 @@ main (register int argc, register char **argv, char **envp)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- while ((optc = getopt_long (argc, argv, "+iu:", longopts, (int *) 0)) != EOF)
+ while ((optc = getopt_long (argc, argv, "+iu:", longopts, NULL)) != -1)
{
switch (optc)
{
@@ -158,7 +158,7 @@ main (register int argc, register char **argv, char **envp)
putenv (*envp);
optind = 0; /* Force GNU getopt to re-initialize. */
- while ((optc = getopt_long (argc, argv, "+iu:", longopts, (int *) 0)) != EOF)
+ while ((optc = getopt_long (argc, argv, "+iu:", longopts, NULL)) != -1)
if (optc == 'u')
putenv (optarg); /* Requires GNU putenv. */