Blame view

RIOT/pkg/oonf_api/patches/0008-Dissolve-enum-into-single-defines.patch 1.61 KB
fb11e647   vrobic   reseau statique a...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
  From d02b58b3cdd26c92f01e812cc1f6cf25703b7431 Mon Sep 17 00:00:00 2001
  From: Hinnerk van Bruinehsen <h.v.bruinehsen@fu-berlin.de>
  Date: Wed, 29 Oct 2014 12:05:11 +0100
  Subject: [PATCH 08/10] Dissolve enum into single defines
  
  ---
   src-api/rfc5444/rfc5444.h | 26 ++++++++++++--------------
   1 file changed, 12 insertions(+), 14 deletions(-)
  
  diff --git a/src-api/rfc5444/rfc5444.h b/src-api/rfc5444/rfc5444.h
  index c5d6420..6b5576e 100644
  --- a/src-api/rfc5444/rfc5444.h
  +++ b/src-api/rfc5444/rfc5444.h
  @@ -43,25 +43,23 @@
  
   #include "common/common_types.h"
  
  -enum {
  -  /* timetlv_max = 14 * 2^28 * 1000 / 1024 = 14000 << 18 = 3 670 016 000 ms */
  -  RFC5444_TIMETLV_MAX = 0xdac00000,
  +/* timetlv_max = 14 * 2^28 * 1000 / 1024 = 14000 << 18 = 3 670 016 000 ms */
  +#define RFC5444_TIMETLV_MAX  0xdac00000
  
  -  /* timetlv_min = 1000/1024 ms */
  -  RFC5444_TIMETLV_MIN = 0x00000001,
  +/* timetlv_min = 1000/1024 ms */
  +#define RFC5444_TIMETLV_MIN 0x00000001
  
  -  /* metric_max = 1<<24 - 256 */
  -  RFC5444_METRIC_MAX = 0xffff00,
  +/* metric_max = 1<<24 - 256 */
  +#define RFC5444_METRIC_MAX 0xffff00
  
  -  /* metric_min = 1 */
  -  RFC5444_METRIC_MIN = 0x000001,
  +/* metric_min = 1 */
  +#define RFC5444_METRIC_MIN 0x000001
  
  -  /* larger than possible metric value */
  -  RFC5444_METRIC_INFINITE = 0xffffff,
  +/* larger than possible metric value */
  +#define RFC5444_METRIC_INFINITE 0xffffff
  
  -  /* infinite path cost */
  -  RFC5444_METRIC_INFINITE_PATH = 0xffffffff,
  -};
  +/* infinite path cost */
  +#define RFC5444_METRIC_INFINITE_PATH 0xffffffff
  
   EXPORT uint8_t rfc5444_timetlv_get_from_vector(
       uint8_t *vector, size_t vector_length, uint8_t hopcount);
  --
  1.9.1