diff options
author | Luca Muscariello <lumuscar+fdio@cisco.com> | 2019-01-24 16:32:25 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@fd.io> | 2019-01-24 16:32:25 +0000 |
commit | 9fc2b9ec49c54ec2d5f0164bbedc1c78732c464c (patch) | |
tree | c7ebcf4c83b5c2f71318bc69c6f6915aaac7ae2a /libparc/parc/security/parc_SecureRandom.c | |
parent | cada1143501a48effc483e3873596c22849926b5 (diff) | |
parent | 097e69e6daeefc84fd271babbdc1b47dfe4c01e5 (diff) |
Merge "Add support for ubuntu18.04 packages."
Diffstat (limited to 'libparc/parc/security/parc_SecureRandom.c')
-rw-r--r-- | libparc/parc/security/parc_SecureRandom.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libparc/parc/security/parc_SecureRandom.c b/libparc/parc/security/parc_SecureRandom.c index 8ebf7f0f..92c308c1 100644 --- a/libparc/parc/security/parc_SecureRandom.c +++ b/libparc/parc/security/parc_SecureRandom.c @@ -35,7 +35,7 @@ struct parc_securerandom { static bool
_parcSecureRandom_Destructor(PARCSecureRandom **instancePtr)
{
- assertNotNull(instancePtr, "Parameter must be a non-null pointer to a PARCSecureRandom pointer.");
+ parcAssertNotNull(instancePtr, "Parameter must be a non-null pointer to a PARCSecureRandom pointer.");
PARCSecureRandom *instance = *instancePtr;
close(instance->randomfd);
@@ -51,7 +51,7 @@ parcObject_Override(PARCSecureRandom, PARCObject, void
parcSecureRandom_AssertValid(const PARCSecureRandom *instance)
{
- assertTrue(parcSecureRandom_IsValid(instance),
+ parcAssertTrue(parcSecureRandom_IsValid(instance),
"PARCSecureRandom is not valid.");
}
@@ -77,7 +77,7 @@ static void _parcSecureRandom_ReSeed(PARCSecureRandom *random, PARCBuffer *buffer)
{
size_t length = parcBuffer_Remaining(buffer);
- write(random->randomfd, parcBuffer_Overlay(buffer, length), length);
+ int wrote_bytes = write(random->randomfd, parcBuffer_Overlay(buffer, length), length);
}
PARCSecureRandom *
@@ -96,7 +96,7 @@ uint32_t parcSecureRandom_Next(PARCSecureRandom *random)
{
uint32_t value;
- read(random->randomfd, &value, sizeof(value));
+ int read_bytes = read(random->randomfd, &value, sizeof(value));
return value;
}
|