[PATCH] Style: use ngx_str_set()

Piotr Sikora piotr at cloudflare.com
Tue Aug 5 21:59:12 UTC 2014


Hey Maxim,

> I don't like at least some of the changes, and I would rather say
> no.

Which one and why? I suspected that you might not like some of the
changes, but I decided to send them all together instead of one by
one... It doesn't have to be all or nothing.

I also think that it's a good practice to set the struct (data+len)
whenever possible, instead of operating on data and len fields
separately, in different parts of code, for the sake of
micro-optimization (i.e. auth_basic), especially when those fields are
exported and can be accessed and modified by 3rd-party code.

Best regards,
Piotr Sikora



More information about the nginx-devel mailing list