add error handling for if we cannot get the random data

This commit is contained in:
2025-06-19 18:21:57 +02:00
parent 2fd839ae12
commit 65d91b2d00

View File

@@ -57,7 +57,8 @@ int main(int argc, char** argv) {
} }
// populate the array with random data // populate the array with random data
getrandom(rdat->dat, c + !!mod, 0); if (getrandom(rdat->dat, c + !!mod, 0) < 0)
error(1, "failed to acquire random data!\n", );
// perform for the input count // perform for the input count
ull headsc = 0; // amount of heads ull headsc = 0; // amount of heads