tmpfile-util: Add missing assert

This commit is contained in:
Daan De Meyer
2022-11-11 09:50:19 +01:00
parent b27c803601
commit 8b9c56ba3e
+2
View File
@@ -25,6 +25,8 @@ int fopen_temporary_at(int dir_fd, const char *path, FILE **ret_file, char **ret
_cleanup_close_ int fd = -1;
int r;
assert(dir_fd >= 0 || dir_fd == AT_FDCWD);
if (path) {
r = tempfn_random(path, NULL, &t);
if (r < 0)