4 ms·
No it is not necessary. If no length is given, the string is assumed to be NULL-terminated. It's a bit unfortunate that they use two code paths for that which
by pantalaimon 8y ago
No it is not necessary.
If no length is given, the string is assumed to be NULL-terminated.
It's a bit unfortunate that they use two code paths for that which are basically just copy & paste.
https://github.com/boazsegev/facil.io/blob/master/lib/facil/http/http.c#L193 https://github.com/boazsegev/facil.io/blob/master/lib/facil/...
- bowild 8y agoThis approach moves an `if` statement out of the loop, so there's no need to repeat it.