Forráskód Böngészése

'memapp' and 'append_mem_block' are now both only used in source
t_msgbuilder.c. Applied patch removes the definition of both from .h.: memapp
moved to .c, append_mem_block only left in .c.
(Interestingly, gcc complained over different definitions, but accepted same
definition twice, for same identifier.)

Closes #SER-422.

Bogdan Pintea 16 éve
szülő
commit
0f92150395
2 módosított fájl, 8 hozzáadás és 15 törlés
  1. 8 2
      modules/tm/t_msgbuilder.c
  2. 0 13
      modules/tm/t_msgbuilder.h

+ 8 - 2
modules/tm/t_msgbuilder.c

@@ -69,18 +69,24 @@
 #include "../../cfg_core.h" /* cfg_get(core, core_cfg, use_dns_failover) */
 #endif
 
+/* convenience macros */
+#define memapp(_d,_s,_len) \
+	do{\
+		memcpy((_d),(_s),(_len));\
+		(_d) += (_len);\
+	}while(0)
 
 #define  append_mem_block(_d,_s,_len) \
 		do{\
 			memcpy((_d),(_s),(_len));\
 			(_d) += (_len);\
-		}while(0);
+		}while(0)
 
 #define append_str(_p,_str) \
 	do{  \
 		memcpy((_p), (_str).s, (_str).len); \
 		(_p)+=(_str).len;  \
- 	} while(0);
+ 	} while(0)
 
 
 /* Build a local request based on a previous request; main

+ 0 - 13
modules/tm/t_msgbuilder.h

@@ -53,19 +53,6 @@
 #define TOTAG_LEN (sizeof(TOTAG)-1)
 
 
-/* convenience macros */
-#define memapp(_d,_s,_len) \
-	do{\
-		memcpy((_d),(_s),(_len));\
-		(_d) += (_len);\
-	}while(0);
-
-#define  append_mem_block(_d,_s,_len) \
-	do{\
-		memcpy((_d),(_s),(_len));\
-		(_d) += (_len);\
-	}while(0);
-
 char *build_local(struct cell *Trans, unsigned int branch,
 	unsigned int *len, char *method, int method_len, str *to);