From 1adb9005612a1db88c3557a3fa7a44677e65051b Mon Sep 17 00:00:00 2001 From: Sylvain Rochet Date: Sat, 18 Aug 2012 12:56:59 +0200 Subject: [PATCH] Moved the include of lwip_md5.h or md5.h into the #if PPP_MD5_RANDM block, as suggested by Ivan Delamer --- src/netif/ppp/magic.c | 7 +++---- src/netif/ppp/magic.h | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/netif/ppp/magic.c b/src/netif/ppp/magic.c index 49da633e..fd5b159c 100644 --- a/src/netif/ppp/magic.c +++ b/src/netif/ppp/magic.c @@ -76,6 +76,9 @@ #if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */ #include "ppp_impl.h" +#include "magic.h" + +#if PPP_MD5_RANDM /* Using MD5 for better randomness if enabled */ #if LWIP_INCLUDED_POLARSSL_MD5 #include "polarssl/lwip_md5.h" @@ -83,10 +86,6 @@ #include "polarssl/md5.h" #endif -#include "magic.h" - -#if PPP_MD5_RANDM /* Using MD5 for better randomness if enabled */ - #define MAGIC_RANDPOOLSIZE 16 /* Bytes stored in the pool of randomness. */ /*****************************/ diff --git a/src/netif/ppp/magic.h b/src/netif/ppp/magic.h index 5dc34018..4661dea5 100644 --- a/src/netif/ppp/magic.h +++ b/src/netif/ppp/magic.h @@ -105,7 +105,7 @@ u32_t magic(void); /* Returns the next magic number */ * Fill buffer with random bytes * * Use the random pool to generate random data. This degrades to pseudo - * random when used faster than randomness is supplied using churnRand(). + * random when used faster than randomness is supplied using magic_churnrand(). * Thus it's important to make sure that the results of this are not * published directly because one could predict the next result to at * least some degree. Also, it's important to get a good seed before