| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
The ARRAY_SIZE is Rusty Russell’s version, that looks a bit more complicated
than the original, but there is a reason to that. This macro will ensure
macro is used properly, and fail compilation if it is not. See reference
link for further explanation.
Reference: http://zubplot.blogspot.com/2015/01/gcc-is-wonderful-better-arraysize-macro.html
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
| |
Based on standard libc strtol(), but has convenience wrapping to catch
errors so that one can convert numbers with just a single function call.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
| |
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Earlier commands happily successed when writing to standard out or error did
not work. Following demonstrates old and new behavior of all commands in
this project.
$ ping -c 1 127.0.0.1 > /dev/full ; echo $?
0
$ ping -c 1 127.0.0.1 > /dev/full ; echo $?
./builddir/ping: write error: No space left on device
1
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
| |
This allows use of error() in other programs. The static common library can
also be used for other utility functions in future.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
Aboid boilerplating.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|