Exit on failure in sample
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include <ent/ent.h>
@@ -13,6 +14,7 @@ main()
memset(buf, 0, sizeof(buf));
if (0 != ent_getentropy(buf, sizeof(buf))) {
perror("getentropy");
+ exit(1);
}
for (i = 0; i < sizeof buf; ++i) {
printf("%02hhx", buf[i]);
