D20096: [WIP/help wanted] Fill UDSEntry::UDS_CREATION_TIME under linux when glibc >= 2.28
Stefan BrĂ¼ns
noreply at phabricator.kde.org
Sat Mar 30 15:28:14 GMT 2019
bruns added a comment.
I think the regular stat and statx implementations should be merged. This requires a little bit of refactoring, but avoids a lot of code duplication.
INLINE COMMENTS
> file.cpp:878
> + const __uint64_t upperLimit = 1024;
> + size_t bufferSize = qBound(lowerLimit, buff.stx_size, upperLimit);
> + QByteArray linkTargetBuffer;
You should start with a more sensible size for lowerLimit, e.g. 256, maybe more - the scope is local, i.e. any excess size is hardly relevant, and allocating 1 and 256 byte cost the same.
lowerLimit is not used below, I think you don't have to name it.
You should use (buff.stx_size + 1), as the size is without trailing null byte.
REPOSITORY
R241 KIO
REVISION DETAIL
https://phabricator.kde.org/D20096
To: meven, #frameworks, dfaure, fvogt, bruns, broulik
Cc: ngraham, kde-frameworks-devel, michaelh, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190330/5aed8d10/attachment.html>
More information about the Kde-frameworks-devel
mailing list