Makefile: Add support for make check to run cppcheck

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
libite: Simplify and fix another memleak in copyfile()

- Simplify: reduce indentation depth
- Always check for error condition first, cleaner code
- Make sure buffer is always freed, use same exit everyhere
- Use readable, but still short, local variable names

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
libite: Minor style cleanup of fsendfile()

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
libite: Fix cppcheck warnings in rsync unit test

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
svc.[ch]: Fix possible out of bounds and NULL ptr deref

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>