log, conf, tap: Define die() as err() plus exit(), drop cppcheck workarounds
If we define die() as a variadic macro, passing __VA_ARGS__ to err(),
and calling exit() outside err() itself, we can drop the workarounds
introduced in commit 36f0199f6e
("conf, tap: Silence two false
positive invalidFunctionArg from cppcheck").
Suggested-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
3
conf.c
3
conf.c
@@ -1064,9 +1064,6 @@ static void conf_ugid(char *runas, uid_t *uid, gid_t *gid)
|
||||
if ((fd = open("/proc/self/uid_map", O_RDONLY | O_CLOEXEC)) < 0) {
|
||||
die("Can't determine if we're in init namespace: %s",
|
||||
strerror(errno));
|
||||
|
||||
/* Silence cppcheck's invalidFunctionArg for 'fd' in read() */
|
||||
return;
|
||||
}
|
||||
|
||||
if (read(fd, buf, BUFSIZ) != sizeof(root_uid_map) ||
|
||||
|
Reference in New Issue
Block a user