Hi Sergey,

> The "shift" remark doesn't describe a problem in details.

It's not a remark, it's the name of the UndefinedBehaviorSanitizer
check that caught the issue [1].

> @@ -507,7 +507,7 @@ ngx_cidr_match(struct sockaddr *sa, ngx_
> 
>              p = inaddr6->s6_addr;
> 
> -            inaddr = p[12] << 24;
> +            inaddr = (in_addr_t) p[12] << 24;
>              inaddr += p[13] << 16;
>              inaddr += p[14] << 8;
>              inaddr += p[15];

While this minimizes the diff and silences the error at hand,
I find my version more readable.

But you're obviously welcome to commit either version.

[1] https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html

Best regards,
Piotr Sikora
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx-devel

Reply via email to