From 23e335784232015dc4b903408903737089a6283b Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Thu, 1 Jun 2023 13:56:05 +0200 Subject: [PATCH] fs-util: Allow passing NULL path to xopenat() We recently codified in the coding style that for openat() style APIs, an empty path can be passed both as the empty string and as NULL, so let's make sure we follow that style in xopenat(). --- src/basic/fs-util.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/basic/fs-util.c b/src/basic/fs-util.c index 78e92609c6..1cf0f5b945 100644 --- a/src/basic/fs-util.c +++ b/src/basic/fs-util.c @@ -1097,7 +1097,6 @@ int xopenat(int dir_fd, const char *path, int open_flags, XOpenFlags xopen_flags int r; assert(dir_fd >= 0 || dir_fd == AT_FDCWD); - assert(path); if (isempty(path)) { assert(!FLAGS_SET(open_flags, O_CREAT|O_EXCL));