D13100: do not use buffered file IO
Albert Astals Cid
noreply at phabricator.kde.org
Sun Oct 28 10:27:39 GMT 2018
aacid added inline comments.
INLINE COMMENTS
> dakon wrote in pam_kwallet.c:696
> While this is "just an int", my personal taste is very much against using const on a file descriptor as this is not how this really works. I don't know.
It is how it really works. Think of as a handle value, you're promising not to assign that handle value to point somewhere else, not that you won't change the value it points to.
Why i want this const? Because when you see that you can be sure that the rest of the file there's no other fd = open() or similar, and thus you're sure that the rest of the operations in this function that use fd are over "path".
REVISION DETAIL
https://phabricator.kde.org/D13100
To: dakon, aacid
Cc: plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20181028/0ed7bf4b/attachment.html>
More information about the Plasma-devel
mailing list