diff options
author | Anne Jan Brouwer <brouwer@annejan.com> | 2017-02-13 14:39:20 +0100 |
---|---|---|
committer | Anne Jan Brouwer <brouwer@annejan.com> | 2017-02-13 14:39:20 +0100 |
commit | e01e9f49b7ab4abb80311ca9b8ae0cffa53f9624 (patch) | |
tree | 746aa6f94482260f4c736f8555294b6a867388cd /src/util.cpp | |
parent | a82b89834431cc94696c2aac82a68315d87dff32 (diff) |
autocleanup
Diffstat (limited to 'src/util.cpp')
-rw-r--r-- | src/util.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/util.cpp b/src/util.cpp index 353e4b71..259eb5ee 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -5,8 +5,8 @@ #include <QProcessEnvironment> #include <QString> #ifdef Q_OS_WIN -#include <windows.h> #include <bcrypt.h> +#include <windows.h> #else #include <sys/time.h> #endif @@ -181,9 +181,10 @@ void Util::copyDir(const QString src, const QString dest) { int Util::rand() { #ifdef Q_OS_WIN quint32 ret = 0; - if (FAILED(BCryptGenRandom(NULL, (PUCHAR)&ret, sizeof(ret), BCRYPT_USE_SYSTEM_PREFERRED_RNG))) - return qrand(); - return ret%RAND_MAX; + if (FAILED(BCryptGenRandom(NULL, (PUCHAR)&ret, sizeof(ret), + BCRYPT_USE_SYSTEM_PREFERRED_RNG))) + return qrand(); + return ret % RAND_MAX; #else return qrand(); #endif |