From 86b15743a13e18603e868d598d65dd04257680e9 Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Sat, 13 Sep 2014 09:47:59 -0400 Subject: [PATCH] random: Rearrange random.h I think ifdef is easier to read than ifndef. Signed-off-by: Anna Schumaker --- include/core/random.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/core/random.h b/include/core/random.h index e332314a..573d3302 100644 --- a/include/core/random.h +++ b/include/core/random.h @@ -4,17 +4,17 @@ #ifndef OCARINA_CORE_RANDOM_H #define OCARINA_CORE_RANDOM_H -#ifndef CONFIG_TEST +#ifdef CONFIG_TEST + +void _seed_random(unsigned int); +unsigned int _pick_random(); + +#else /* CONFIG_TEST */ #include static inline void _seed_random(unsigned int n) { srand(time(NULL) + n); } static inline unsigned int _pick_random() { return rand(); } -#else /* CONFIG_TEST */ - -void _seed_random(unsigned int); -unsigned int _pick_random(); - #endif /* CONFIG_TEST */