aboutsummaryrefslogtreecommitdiffstats
path: root/common/rdr/RandomStream.cxx
diff options
context:
space:
mode:
authorMadeleine Nilsson <madni@cendio.se>2024-11-04 15:00:43 +0100
committerMadeleine Nilsson <madni@cendio.se>2024-11-21 17:38:35 +0100
commit0af41e7fed978f934f3dc6ca8c99599a212467c5 (patch)
treeb59907e4e0c4bbbef45346794a890f17009c117f /common/rdr/RandomStream.cxx
parent5b74bf1bbd4aef9f71ef76b718c79fe7b09bf5f5 (diff)
downloadtigervnc-0af41e7fed978f934f3dc6ca8c99599a212467c5.tar.gz
tigervnc-0af41e7fed978f934f3dc6ca8c99599a212467c5.zip
Capitalize first letter in log, exception & error
The reason for this is to keep a consistency through out the project.
Diffstat (limited to 'common/rdr/RandomStream.cxx')
-rw-r--r--common/rdr/RandomStream.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/common/rdr/RandomStream.cxx b/common/rdr/RandomStream.cxx
index 449a84c0..b045d48a 100644
--- a/common/rdr/RandomStream.cxx
+++ b/common/rdr/RandomStream.cxx
@@ -50,11 +50,11 @@ RandomStream::RandomStream()
if (GetLastError() == (DWORD)NTE_BAD_KEYSET) {
if (!CryptAcquireContext(&provider, nullptr, nullptr,
PROV_RSA_FULL, CRYPT_NEWKEYSET)) {
- vlog.error("unable to create keyset");
+ vlog.error("Unable to create keyset");
provider = 0;
}
} else {
- vlog.error("unable to acquire context");
+ vlog.error("Unable to acquire context");
provider = 0;
}
}
@@ -69,7 +69,7 @@ RandomStream::RandomStream()
{
#endif
#endif
- vlog.error("no OS supplied random source - using rand()");
+ vlog.error("No OS supplied random source, using rand()");
seed += (unsigned int) time(nullptr) + getpid() + getpid() * 987654 + rand();
srand(seed);
}
@@ -89,7 +89,7 @@ bool RandomStream::fillBuffer() {
#ifdef RFB_HAVE_WINCRYPT
if (provider) {
if (!CryptGenRandom(provider, availSpace(), (uint8_t*)end))
- throw rdr::Win32Exception("unable to CryptGenRandom", GetLastError());
+ throw rdr::Win32Exception("Unable to CryptGenRandom", GetLastError());
end += availSpace();
} else {
#else
@@ -97,7 +97,7 @@ bool RandomStream::fillBuffer() {
if (fp) {
size_t n = fread((uint8_t*)end, 1, availSpace(), fp);
if (n <= 0)
- throw rdr::PosixException("reading /dev/urandom or /dev/random failed",
+ throw rdr::PosixException("Reading /dev/urandom or /dev/random failed",
errno);
end += n;
} else {