basic: make check-pointer-deref clean
Add the needed assert changes to make the code clean for the new check-pointer-deref script. Note that for `_cmp()` functions its a bit of a question if we want `assert()` or `POINTER_MAY_BE_NULL()` here. The former is more correct but it adds a (small) runtime hit. If we use POINTER_MAY_BE_NULL() it is compiled out but strictly speaking it is wrong (so at least we would need a comment).
This commit is contained in:
@@ -25,6 +25,8 @@ static int parse_alloc_uid(const char *path, const char *name, const char *t, ui
|
||||
uid_t uid;
|
||||
int r;
|
||||
|
||||
assert(ret_uid);
|
||||
|
||||
r = parse_uid(t, &uid);
|
||||
if (r < 0)
|
||||
return log_debug_errno(r, "%s: failed to parse %s %s, ignoring: %m", path, name, t);
|
||||
|
||||
Reference in New Issue
Block a user