aboutsummaryrefslogtreecommitdiff
path: root/src/cadet/cadet_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cadet/cadet_common.c')
-rw-r--r--src/cadet/cadet_common.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/cadet/cadet_common.c b/src/cadet/cadet_common.c
index 855e9e20c..42ccf189c 100644
--- a/src/cadet/cadet_common.c
+++ b/src/cadet/cadet_common.c
@@ -34,7 +34,7 @@
34 * @return String representing FWD or BCK. 34 * @return String representing FWD or BCK.
35 */ 35 */
36char * 36char *
37GM_f2s (int fwd) 37GC_f2s (int fwd)
38{ 38{
39 if (GNUNET_YES == fwd) 39 if (GNUNET_YES == fwd)
40 { 40 {
@@ -52,7 +52,7 @@ GM_f2s (int fwd)
52} 52}
53 53
54int 54int
55GM_is_pid_bigger (uint32_t bigger, uint32_t smaller) 55GC_is_pid_bigger (uint32_t bigger, uint32_t smaller)
56{ 56{
57 return (GNUNET_YES == PID_OVERFLOW (smaller, bigger) || 57 return (GNUNET_YES == PID_OVERFLOW (smaller, bigger) ||
58 (bigger > smaller && GNUNET_NO == PID_OVERFLOW (bigger, smaller))); 58 (bigger > smaller && GNUNET_NO == PID_OVERFLOW (bigger, smaller)));
@@ -60,25 +60,25 @@ GM_is_pid_bigger (uint32_t bigger, uint32_t smaller)
60 60
61 61
62uint32_t 62uint32_t
63GM_max_pid (uint32_t a, uint32_t b) 63GC_max_pid (uint32_t a, uint32_t b)
64{ 64{
65 if (GM_is_pid_bigger(a, b)) 65 if (GC_is_pid_bigger(a, b))
66 return a; 66 return a;
67 return b; 67 return b;
68} 68}
69 69
70 70
71uint32_t 71uint32_t
72GM_min_pid (uint32_t a, uint32_t b) 72GC_min_pid (uint32_t a, uint32_t b)
73{ 73{
74 if (GM_is_pid_bigger(a, b)) 74 if (GC_is_pid_bigger(a, b))
75 return b; 75 return b;
76 return a; 76 return a;
77} 77}
78 78
79 79
80const struct GNUNET_HashCode * 80const struct GNUNET_HashCode *
81GM_h2hc (const struct GNUNET_CADET_Hash *id) 81GC_h2hc (const struct GNUNET_CADET_Hash *id)
82{ 82{
83 static struct GNUNET_HashCode hc; 83 static struct GNUNET_HashCode hc;
84 memcpy (&hc, id, sizeof (*id)); 84 memcpy (&hc, id, sizeof (*id));
@@ -88,11 +88,11 @@ GM_h2hc (const struct GNUNET_CADET_Hash *id)
88 88
89 89
90const char * 90const char *
91GM_h2s (const struct GNUNET_CADET_Hash *id) 91GC_h2s (const struct GNUNET_CADET_Hash *id)
92{ 92{
93 static char s[53]; 93 static char s[53];
94 94
95 memcpy (s, GNUNET_h2s_full (GM_h2hc (id)), 52); 95 memcpy (s, GNUNET_h2s_full (GC_h2hc (id)), 52);
96 s[52] = '\0'; 96 s[52] = '\0';
97 97
98 return s; 98 return s;
@@ -101,7 +101,7 @@ GM_h2s (const struct GNUNET_CADET_Hash *id)
101 101
102#if !defined(GNUNET_CULL_LOGGING) 102#if !defined(GNUNET_CULL_LOGGING)
103const char * 103const char *
104GM_m2s (uint16_t m) 104GC_m2s (uint16_t m)
105{ 105{
106 static char buf[32]; 106 static char buf[32];
107 const char *t; 107 const char *t;
@@ -341,7 +341,7 @@ GM_m2s (uint16_t m)
341} 341}
342#else 342#else
343const char * 343const char *
344GM_m2s (uint16_t m) 344GC_m2s (uint16_t m)
345{ 345{
346 return ""; 346 return "";
347} 347}