summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
author刘文坛 <[email protected]>2023-12-14 06:48:44 +0000
committer刘文坛 <[email protected]>2023-12-14 06:48:44 +0000
commita4254d7b60b1aee385c1531ab8c6f7f69b074b90 (patch)
tree411ce4bb8a0019a9ecac2344be6c1f99d3f0b928 /include
parent37117f9f350c0c7b624b8f74f0b03cb8ee20be72 (diff)
[HTTP_DECODER]first simple http unit_test passed
Diffstat (limited to 'include')
-rw-r--r--include/stellar/session.h2
-rw-r--r--include/stellar/utils.h4
2 files changed, 4 insertions, 2 deletions
diff --git a/include/stellar/session.h b/include/stellar/session.h
index 6ce5625..e8f51f5 100644
--- a/include/stellar/session.h
+++ b/include/stellar/session.h
@@ -110,7 +110,7 @@ const struct packet *session_get0_current_packet(struct session *sess);
#define PACKET_DIRECTION_C2S 0
#define PACKET_DIRECTION_S2C 1
-int packet_get_direction(const struct packet *pkt);
+int packet_get_direction(const struct packet *pkt);
const char *packet_get0_data(const struct packet *pkt, size_t *data_len);
int packet_arrive_time(const struct packet *pkt, struct timeval *ts);
diff --git a/include/stellar/utils.h b/include/stellar/utils.h
index 7beafbb..eb5e705 100644
--- a/include/stellar/utils.h
+++ b/include/stellar/utils.h
@@ -5,7 +5,9 @@
#define CALLOC(type, number) ((type *)calloc(sizeof(type), number))
-#define FREE(p) {free(p);p=NULL;}
+#define REALLOC(type, ptr, number) ((type *)realloc(ptr, (number) * sizeof(type)))
+
+#define FREE(p) {free(p); p = NULL;}
#define TRUE 1
#define FALSE 0