Project Info Name.......: gnu-hello
Description: GNU Hello


gnu-hello       
Info
Commit...:30f3c8e8eb96aca67b6e6e523c5ca4f33dab6568
Author...:karl <>
Committer:karl <>
Date.....:Mon Oct 16 22:31:56 2006 +0000
Parents..:27d10d838f04468e31cfaf3e404a3a19445a5865

Message
[project @ 2006-10-16 22:31:56 by karl]
(main): compare getopt_long result to -1, not EOF,
since EOF might not be -1.  Use NULL instead of (int *)0.
Both suggestions from Eric Blake.

Changes
diff --git a/src/hello.c b/src/hello.c
line changes: +1/-2
index a559fca..e5d39d0
--- a/src/hello.c
+++ b/src/hello.c
@@ -53,8 +53,7 @@ main (int argc, char *argv[])
   textdomain (PACKAGE);
 #endif
 
-  while ((optc = getopt_long (argc, argv, "g:hntv", longopts, (int *) 0))
-         != EOF)
+  while ((optc = getopt_long (argc, argv, "g:hntv", longopts, NULL) != -1)
     switch (optc)
       {
       case 'v':

This website is licensed under AGPL-3.0. Feel free to copy!