[PATCH] Removed the unsafe ngx_memcmp() wrapper for memcmp(3)

Alejandro Colomar alx.manpages at gmail.com
Fri Nov 4 15:28:25 UTC 2022


On 11/4/22 16:24, Alejandro Colomar wrote:
> The changes, apart from the removal of the macro itself, were scripted:
> 
> $ find src/ -type f \
>    | grep '\.[ch]$' \
>    | xargs sed -i 's/ngx_memcmp/memcmp/';

And after running the script, I compressed manually some lines that could be 
compressed, such as:


-        if (ngx_memcmp(header->name.data, "path", sizeof("path") - 1)
-            == 0)
-        {
+        if (memcmp(header->name.data, "path", sizeof("path") - 1) == 0) {

-- 
<http://www.alejandro-colomar.es/>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20221104/10df94be/attachment.bin>


More information about the nginx-devel mailing list