From 413ea9bc8ea638e3c41e99d3ab4551f5ba7aeb6e Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Fri, 1 May 2020 18:32:26 -0700 Subject: [PATCH] Minor RTSP code cleanup --- src/RtspConnection.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/RtspConnection.c b/src/RtspConnection.c index 186c512..ed71d21 100644 --- a/src/RtspConnection.c +++ b/src/RtspConnection.c @@ -20,13 +20,6 @@ static ENetPeer* peer; #define CHAR_TO_INT(x) ((x) - '0') #define CHAR_IS_DIGIT(x) ((x) >= '0' && (x) <= '9') -#define SWAP_CHANNEL(config, i, j) \ -{ \ - unsigned char tmp = (config)->mapping[i]; \ - (config)->mapping[i] = (config)->mapping[j]; \ - (config)->mapping[j] = tmp; \ -} - // Create RTSP Option static POPTION_ITEM createOptionItem(char* option, char* content) { @@ -41,8 +34,6 @@ static POPTION_ITEM createOptionItem(char* option, char* content) return NULL; } - strcpy(item->option, option); - item->content = strdup(content); if (item->content == NULL) { free(item->option); @@ -50,8 +41,6 @@ static POPTION_ITEM createOptionItem(char* option, char* content) return NULL; } - strcpy(item->content, content); - item->next = NULL; item->flags = FLAG_ALLOCATED_OPTION_FIELDS;