Move MAX, MIN and ABS to sys/cc.h
This commit is contained in:
parent
c9324d133f
commit
0dab6926b3
33 changed files with 41 additions and 93 deletions
|
@ -92,8 +92,6 @@ static struct broadcast_announcement_state {
|
|||
#define PRINTF(...)
|
||||
#endif
|
||||
|
||||
#define MIN(a, b) ((a)<(b)?(a):(b))
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static void
|
||||
send_adv(void *ptr)
|
||||
|
|
|
@ -42,20 +42,13 @@
|
|||
* @{
|
||||
*/
|
||||
|
||||
#include "sys/cc.h"
|
||||
#include "net/rime/rime.h"
|
||||
#include "net/rime/ipolite.h"
|
||||
#include "lib/random.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#ifndef MAX
|
||||
#define MAX(a, b) ((a) > (b)? (a) : (b))
|
||||
#endif /* MAX */
|
||||
|
||||
#ifndef MIN
|
||||
#define MIN(a, b) ((a) < (b)? (a) : (b))
|
||||
#endif /* MIN */
|
||||
|
||||
#define DEBUG 0
|
||||
#if DEBUG
|
||||
#include <stdio.h>
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
*/
|
||||
|
||||
#include "contiki.h"
|
||||
|
||||
#include "sys/cc.h"
|
||||
#include "lib/list.h"
|
||||
#include "net/rime/rime.h"
|
||||
#include "net/rime/announcement.h"
|
||||
|
@ -90,8 +90,6 @@ static struct polite_announcement_state {
|
|||
#define PRINTF(...)
|
||||
#endif
|
||||
|
||||
#define MIN(a, b) ((a)<(b)?(a):(b))
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static void
|
||||
send_adv(clock_time_t interval)
|
||||
|
|
|
@ -42,21 +42,13 @@
|
|||
* @{
|
||||
*/
|
||||
|
||||
#include "sys/cc.h"
|
||||
#include "net/rime/rime.h"
|
||||
#include "net/rime/polite.h"
|
||||
#include "lib/random.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#ifndef MAX
|
||||
#define MAX(a,b) ((a) > (b)? (a) : (b))
|
||||
#endif /* MAX */
|
||||
|
||||
#ifndef MIN
|
||||
#define MIN(a, b) ((a) < (b)? (a) : (b))
|
||||
#endif /* MIN */
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static void
|
||||
recv(struct abc_conn *abc)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue