IPv6 nameservers can be significantly longer than 16 characters in length.
For example, `2001:0db8:85a3:0000:0000:8a2e:0370:7334` is 39 characters long,
and certain syntax elements (e.g. zone indices) can make them even longer.
This patch allows up to 256 characters for the nameserver, which is large
enough to contain the maximum length of any hostname (~253 ASCII characters),
and definitely enough for any IPv4 or IPv6 address.
Getting warning compiling for Android:
./util.c:35:6: warning: variable 'rv' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (sscanf(buf, "%15s", addr) == 1)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./util.c:79:9: note: uninitialized use occurs here
return rv;
^~
iodine does not seem to follow any styling guidelines (mixture of
different function prototypes, ...). So let's introduce some. This
will improve overall code quality and readability.
Additionally, warnings will improve code quality as well. Let's turn on
very pedantic warnings, and fix everything where the compiler barks
back.
Introduce the following function definition scheme:
type function_name(type name, type1 name1 ...)
{
}
This allows us to copy and paste the definition to the declaration by
selecting one single line.
Furthermore, limit line length to 80 characters.
Signed-off-by: Ralf Ramsauer <ralf@ramses-pyramidenbau.de>
"Permission to use, copy, modify, and distribute this software" is now
"Permission to use, copy, modify, and/or distribute this software".
Add license header to source files missing one.