tree-wide: use ASSERT_PTR more
This commit is contained in:
@@ -253,7 +253,7 @@ int execute_directories(
|
||||
}
|
||||
|
||||
static int gather_environment_generate(int fd, void *arg) {
|
||||
char ***env = arg;
|
||||
char ***env = ASSERT_PTR(arg);
|
||||
_cleanup_fclose_ FILE *f = NULL;
|
||||
_cleanup_strv_free_ char **new = NULL;
|
||||
int r;
|
||||
@@ -264,8 +264,6 @@ static int gather_environment_generate(int fd, void *arg) {
|
||||
* fd is always consumed, even on error.
|
||||
*/
|
||||
|
||||
assert(env);
|
||||
|
||||
f = fdopen(fd, "r");
|
||||
if (!f) {
|
||||
safe_close(fd);
|
||||
@@ -295,13 +293,11 @@ static int gather_environment_generate(int fd, void *arg) {
|
||||
|
||||
static int gather_environment_collect(int fd, void *arg) {
|
||||
_cleanup_fclose_ FILE *f = NULL;
|
||||
char ***env = arg;
|
||||
char ***env = ASSERT_PTR(arg);
|
||||
int r;
|
||||
|
||||
/* Write out a series of env=cescape(VAR=value) assignments to fd. */
|
||||
|
||||
assert(env);
|
||||
|
||||
f = fdopen(fd, "w");
|
||||
if (!f) {
|
||||
safe_close(fd);
|
||||
@@ -321,13 +317,11 @@ static int gather_environment_collect(int fd, void *arg) {
|
||||
|
||||
static int gather_environment_consume(int fd, void *arg) {
|
||||
_cleanup_fclose_ FILE *f = NULL;
|
||||
char ***env = arg;
|
||||
char ***env = ASSERT_PTR(arg);
|
||||
int r = 0;
|
||||
|
||||
/* Read a series of env=cescape(VAR=value) assignments from fd into env. */
|
||||
|
||||
assert(env);
|
||||
|
||||
f = fdopen(fd, "r");
|
||||
if (!f) {
|
||||
safe_close(fd);
|
||||
|
||||
Reference in New Issue
Block a user