Primarily to get rid of following warning.
getdata.c:63:26: warning: 'macstring' may be used uninitialized in this function
getdata.c:66:20: warning: 'macaddr_p' may be used uninitialized in this function
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
The test had == used as = which is bashisms, and does not work on
system, such as Ubuntu, where /bin/sh is dash or some other
non-bash shell.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
With a bit of manual rereading and thinking I came to conclusion
that users will most likely fetch same data over and over again.
Advicing to kernel to keep pages into cache seems to be correct
thing to do.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
With a bit of gcov analysis, and logical thinking, it was obvious
that section that got to be removed cannot be reach.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
The eprintf removed and replaced with err & warn. Option parsing
no longer tries to find missing optargs, which are getopts should
notice. Few complier warnings got to be removed as well. Finally
the commments will no longer exceed standard terminal width.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Code blocks to more common first order. Also couple checks got to
be refactored next to section where update happens, that will
reduce unnecessary checking.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
The xml output does not use output file as all other outputs, it
has sections here and there while everything is supposed to be in
output.c, and finally the unnecessary field analysis loop made
program about 20% slower when xml was not asked.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
ENOTTY, and clean_up will see that without this reset. At least
linux does this, and possibly some other systems. There's a
report from FreeBSD 8.0 which matches quite well with the
symptom.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
The standard stuff that is needed in ignore files to make git
status etc commands not to freak out after a build.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
The m4 has now .gitignore without content. That should work just
fine as a place holder director for automake.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Who ever will compile the sources is encouraged to use
./autogen.sh to get ./configure and other necessary files.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>