Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 54136f8b authored by Bart Van Assche's avatar Bart Van Assche
Browse files

Add a comment to explain how errno is set



Since it is nontrivial which modifies `errno` is modified in
ExecuteForTask(), add a comment that explains this.

Bug: 213617178
Test: Compile-tested only.
Change-Id: I49ce9c8054fdc59e61b2e5f9ffe6f16743a94401
Signed-off-by: default avatarBart Van Assche <bvanassche@google.com>
parent 48d403a5
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -215,6 +215,9 @@ bool SetAttributeAction::ExecuteForTask(int tid) const {
                return false;
            }
        }
        // The PLOG() statement below uses the error code stored in `errno` by
        // WriteStringToFile() because access() only overwrites `errno` if it fails
        // and because this code is only reached if the access() function returns 0.
        PLOG(ERROR) << "Failed to write '" << value_ << "' to " << path;
        return false;
    }