]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
xattr-util: use empty_to_null() where appropriate
authorLennart Poettering <lennart@amutable.com>
Tue, 2 Jun 2026 15:35:49 +0000 (17:35 +0200)
committerLennart Poettering <lennart@amutable.com>
Tue, 23 Jun 2026 20:55:23 +0000 (22:55 +0200)
src/basic/xattr-util.c

index fb886f6ae82c56a547bab11ccc7181a02d97e237..417e8650e53caa3544bc91af5a2671dc6dd8738f 100644 (file)
@@ -36,8 +36,7 @@ static int normalize_and_maybe_pin_inode(
         assert(ret_tfd);
         assert(ret_opath);
 
-        if (isempty(*path))
-                *path = NULL; /* Normalize "" to NULL */
+        *path = empty_to_null(*path); /* Normalize "" to NULL */
 
         if (*fd == AT_FDCWD) {
                 if (!*path) /* Both unspecified? Then operate on current working directory */