changeset 68:be5b218f0765

src/g23m-gprs/llc: fixed many invalid uses of ##
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 20 Jul 2018 00:51:15 +0000
parents c7af699af1c4
children 478dc66469b7
files src/g23m-gprs/llc/llc.h src/g23m-gprs/llc/llc_uf.c
diffstat 2 files changed, 13 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/src/g23m-gprs/llc/llc.h	Fri Jul 20 00:30:34 2018 +0000
+++ b/src/g23m-gprs/llc/llc.h	Fri Jul 20 00:51:15 2018 +0000
@@ -293,12 +293,12 @@
 /*
  * Switch service s of entity e to use incarnation i.
  */
-#define SWITCH_SERVICE(e,s,i) e##_data->##s = &(##e##_data->##s##_base[i]);
+#define SWITCH_SERVICE(e,s,i) e##_data->s = &(e##_data->s##_base[i]);
 
 /*
  * Switch LLC layer parameter p to incarnation i.
  */
-#define SWITCH_PARAM(p,i) llc_data->##p = &(llc_data->##p##_base[i]);
+#define SWITCH_PARAM(p,i) llc_data->p = &(llc_data->p##_base[i]);
 
 
 /*
@@ -345,7 +345,7 @@
  * Tag XID parameter if requested to negotiate
  */
 #define TAG_IF_REQUESTED(V,P)                                                 \
-  if (llc_data->##V##valid)                                                   \
+  if (llc_data->V valid)                                                      \
   {                                                                           \
     llc_data->u->xid_tag |= (0x00000001L << P);                               \
   }
@@ -354,9 +354,9 @@
  * Tag XID parameter if requested to negotiate and sense of negotiation fits
  */
 #define TAG_IF_REQUESTED_RSP(S,V,P)                                           \
-  if (llc_data->u->requested_xid.##V##.valid)                                 \
+  if (llc_data->u->requested_xid.V.valid)                                     \
   {                                                                           \
-    if (llc_data->decoded_xid.##V##.valid)                                    \
+    if (llc_data->decoded_xid.V.valid)                                        \
     {                                                                         \
       /* simple add parameter. Sense of negotiation is already checked */     \
       llc_data->u->xid_tag |= (0x00000001L << P);                             \
@@ -364,7 +364,7 @@
     else                                                                      \
     {                                                                         \
       /* Sense of negotiation compared with current values */                 \
-      if (llc_data->u->requested_xid.##V##.value  S  *(llc_data->##V))        \
+      if (llc_data->u->requested_xid.V.value  S  *(llc_data->V))              \
       {                                                                       \
         llc_data->u->xid_tag |= (0x00000001L << P);                           \
       }                                                                       \
--- a/src/g23m-gprs/llc/llc_uf.c	Fri Jul 20 00:30:34 2018 +0000
+++ b/src/g23m-gprs/llc/llc_uf.c	Fri Jul 20 00:51:15 2018 +0000
@@ -60,7 +60,7 @@
  * v(ariable)   - variable name of parameter
  */
 #define CHECK_INSTANCE(v)                                                     \
-  if (llc_data->decoded_xid.##v##.valid)                                      \
+  if (llc_data->decoded_xid.v.valid)                                          \
   {                                                                           \
     /*                                                                        \
      * More than one instance of the same XID parameter type is included.     \
@@ -105,8 +105,8 @@
        * preferences.                                                         \
        * <R.LLC.XIDNEG_R.A.003>                                               \
        */                                                                     \
-      llc_data->decoded_xid.##v##.valid = TRUE;                               \
-      llc_data->decoded_xid.##v##.value = d;                                  \
+      llc_data->decoded_xid.v.valid = TRUE;                                   \
+      llc_data->decoded_xid.v.value = d;                                      \
       break;                                                                  \
     }                                                                         \
     else /* SGSN_RESPONSE */                                                  \
@@ -139,14 +139,14 @@
       /*                                                                      \
        * First compare the value with the requested value, if there is any    \
        */                                                                     \
-      if ( (llc_data->u->requested_xid.##v##.valid)    AND                    \
-           (llc_data->u->requested_xid.##v##.value s d)  )                    \
+      if ( (llc_data->u->requested_xid.v.valid)    AND                        \
+           (llc_data->u->requested_xid.v.value s d)  )                        \
       {                                                                       \
         TRACE_0_INFO ("Sense of negotiation error");                          \
         return FALSE;                                                         \
       }                                                                       \
-      else if( !(llc_data->u->requested_xid.##v##.valid) AND                  \
-                (*(llc_data->##v) s d) )                                      \
+      else if( !(llc_data->u->requested_xid.v.valid) AND                      \
+                (*(llc_data->v) s d) )                                        \
       {                                                                       \
         /*                                                                    \
          * If the value was not requested but included in response, compare   \