]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
audit-util: use read_full_virtual_file() 37299/head
authorMike Yuan <me@yhndnzj.com>
Thu, 13 Mar 2025 15:03:42 +0000 (16:03 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 1 May 2025 04:10:26 +0000 (13:10 +0900)
Conversely this one is "raw" file, but let's switch to
static inline helper for it.

src/basic/audit-util.c

index 4f50339d6d738d16cafc8aea2dc693c7a741c018..0d664b0d8b7f659394f898326b362f324969d9e1 100644 (file)
@@ -37,7 +37,7 @@ static int audit_read_field(const PidRef *pid, const char *field, char **ret) {
 
         _cleanup_free_ char *s = NULL;
         bool enoent = false;
-        r = read_virtual_file(p, SIZE_MAX, &s, /* ret_size= */ NULL);
+        r = read_full_virtual_file(p, &s, /* ret_size= */ NULL);
         if (r == -ENOENT) {
                 if (proc_mounted() == 0)
                         return -ENOSYS;