chat.c: fix format argument type

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
civetweb.c: %n in format expect 'int *' and not 'uint *'

Change len from unsigned int to int to fix usage of %n.

[src/civetweb.c:5616]: (warning) %n in format string (no. 6) requires
 'int *' but the argument type is 'unsigned int *'.
[src/civetweb.c:5628]: (warning) %n in format string (no. 2) requires
 'int *' but the argument type is 'unsigned int *'.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
civetweb.c: fix realloc handling

Fix handling of realloc. If realloc() fails it returns NULL, assigning
the return value of realloc() directly to the pointer without checking
for the result will lead to a memory leak in error case.

Use a temporary pointer to hold the result of realloc().

Fix for:
[src/civetweb.c:409]: (error) Common realloc mistake: 'data' nulled but
not freed upon failure

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
civetweb.c: check array limit before access array

Fix for:
[src/civetweb.c:2338]: (style) Array index 'i' is used before limits check.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
CivetServer.cpp: check array limit before access array

Fix for:

[src/CivetServer.cpp:153]: (style) Array index 'i' is used before
limits check.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
unit_test.c: fix printf, remove unused parameter

Fix for:
[test/unit_test.c:827]: (warning) printf format string requires 0
 parameters but 1 is given.
[test/unit_test.c:833]: (warning) printf format string requires 0
 parameters but 1 is given.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
mod_lua.inl: Clarify expression with parentheses

Fix for:
[src/mod_lua.inl:899]: (style) Suspicious condition (assignment +
 comparison); Clarify expression with parenth

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>