fix compiler warning: assignment within conditional expression
authorYang Tse <yangsita@gmail.com>
Mon, 7 Apr 2008 12:40:05 +0000 (12:40 +0000)
committerYang Tse <yangsita@gmail.com>
Mon, 7 Apr 2008 12:40:05 +0000 (12:40 +0000)
ares/ares_getopt.c

index 3b565a4..177b26f 100644 (file)
@@ -82,7 +82,7 @@ ares_getopt(int nargc, char * const nargv[], const char *ostr)
         }
     }                                         /* option letter okay? */
     if ((optopt = (int)*place++) == (int)':' ||
-        !(oli = strchr(ostr, optopt))) {
+        (oli = strchr(ostr, optopt)) == NULL) {
         /*
          * if the user didn't specify '-' as an option,
          * assume it means EOF.