riolet/nope.c — pull request #4 by MagicalTux (2014-07-25 11:45:56+00:00)
Title: optimize writing of static text to client

When sending fixed text to client rather than using sprintf/strlen, it is possible to optimize this by having the compiler compute the appropriate length.

Using sizeof(_string) would return length of string plus 1 (the final \0) - so we use sizeof(_str)-1.

Makes the code easier to read and removes the need to use an intermediate buffer.