mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-23 18:32:55 +00:00
remove redundant bits in qRandomUuid() function
at first I was thinking about making it compliant with the RFC but then I figured none of the use-cases require it to be compliant (e.g. partitionmanager and the tools that use the generated UUID) Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
db628e4423
commit
96e0ecf005
1 changed files with 1 additions and 4 deletions
|
@ -242,8 +242,7 @@ quint32 qChecksum(const char *data, uint len)
|
|||
/*!
|
||||
\relates QByteArray
|
||||
|
||||
Returns pseudo-randomly generated UUID in DCE variant as
|
||||
described in \l{https://www.ietf.org/rfc/rfc4122.txt}.
|
||||
Returns pseudo-randomly generated UUID.
|
||||
*/
|
||||
QByteArray qRandomUuid()
|
||||
{
|
||||
|
@ -255,8 +254,6 @@ QByteArray qRandomUuid()
|
|||
*randombufiter = qrand();
|
||||
randombufiter += randiterratio;
|
||||
}
|
||||
randombuf[6] = (randombuf[6] & 0x0FFF) | 0x4000; // random version
|
||||
randombuf[8] = (randombuf[8] & 0x3F) | 0x80; // DCE variant
|
||||
|
||||
#define UUID_TOHEX(bufi, randi) \
|
||||
uuidbuf[bufi] = tohex[(randombuf[randi] >> 4) & 0xf]; \
|
||||
|
|
Loading…
Add table
Reference in a new issue