Clang 3.9 report

Russ Allbery eagle at eyrie.org
Fri Aug 26 21:33:32 UTC 2016


Julien ÉLIE <julien at trigofacile.com> writes:

> Hi The Doctor,

>> lib/getaddrinfo-t.c:265:13: warning: logical not is only applied to the left
>>       hand side of this comparison [-Wlogical-not-parentheses]
>> 	      if (!strcmp(ai->ai_canonname, first->ai_canonname) == 0) {

> Thanks for the report.
> I would suggest the following change:

> --- getaddrinfo-t.c	(révision 10040)
> +++ getaddrinfo-t.c	(copie de travail)
> @@ -262,7 +262,7 @@
>      is_int(0, saddr->sin_port, "...port is 0");
>      first = ai;
>      for (found = 0; ai != NULL; ai = ai->ai_next) {
> -        if (!strcmp(ai->ai_canonname, first->ai_canonname) == 0) {
> +        if (strcmp(ai->ai_canonname, first->ai_canonname) != 0) {
>              ok(0, "...canonname matches");
>              break;
>          }

> Russ, could you take it into account in rra-c-util?

Yup, done.  Thanks!

-- 
Russ Allbery (eagle at eyrie.org)              <http://www.eyrie.org/~eagle/>

    Please send questions to the list rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.


More information about the inn-workers mailing list