changeset 100:3aea54128fef

common: use <nomad/error.h> Signed-off-by: Holly Sipek <holly.sipek@gmail.com>
author Holly Sipek <holly.sipek@gmail.com>
date Sat, 17 Oct 2015 11:48:17 -0400
parents 7f1f390107a7
children 366635b72c32
files src/common/rand.c
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/common/rand.c	Sat Oct 17 11:44:08 2015 -0400
+++ b/src/common/rand.c	Sat Oct 17 11:48:17 2015 -0400
@@ -23,13 +23,12 @@
 
 #include <fcntl.h>
 #include <stdio.h>
-#include <errno.h>
-#include <assert.h>
 #include <unistd.h>
 
 #include <nomad/types.h>
 #include <nomad/rand.h>
 #include <nomad/config.h>
+#include <nomad/error.h>
 
 uint32_t rand32(void)
 {
@@ -43,13 +42,13 @@
 	if (fd == -1) {
 		fprintf(stderr, "Failed to get random number: %s",
 		        strerror(errno));
-		assert(0);
+		ASSERT(0);
 	}
 
 	if (read(fd, &ret, sizeof(ret)) != sizeof(ret)) {
 		fprintf(stderr, "Failed to get random number: %s",
 		        strerror(errno));
-		assert(0);
+		ASSERT(0);
 	}
 
 	close(fd);