diff options
author | David Tardon <dtardon@redhat.com> | 2022-08-09 14:35:15 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2022-09-13 08:13:27 +0200 |
commit | 995340074e554b4bf4a0fdb0cb7436692c5a4ffd (patch) | |
tree | ca3ee001db3e608ee80478f42fea9c3b409f1b7b /src/import/import-fs.c | |
parent | 6d64cb0625691e2b9eda8babe07ac8281f9467ee (diff) | |
download | systemd-995340074e554b4bf4a0fdb0cb7436692c5a4ffd.tar.gz |
tree-wide: use ASSERT_PTR more
Diffstat (limited to 'src/import/import-fs.c')
-rw-r--r-- | src/import/import-fs.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/import/import-fs.c b/src/import/import-fs.c index ff7f51a60a..1c5581fd61 100644 --- a/src/import/import-fs.c +++ b/src/import/import-fs.c @@ -70,11 +70,9 @@ static void progress_show(ProgressInfo *p) { } static int progress_path(const char *path, const struct stat *st, void *userdata) { - ProgressInfo *p = userdata; + ProgressInfo *p = ASSERT_PTR(userdata); int r; - assert(p); - r = free_and_strdup(&p->path, path); if (r < 0) return r; @@ -86,9 +84,8 @@ static int progress_path(const char *path, const struct stat *st, void *userdata } static int progress_bytes(uint64_t nbytes, void *userdata) { - ProgressInfo *p = userdata; + ProgressInfo *p = ASSERT_PTR(userdata); - assert(p); assert(p->size != UINT64_MAX); p->size += nbytes; |