mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2025-08-18 01:15:46 +00:00
Minor RTSP code cleanup
This commit is contained in:
parent
9ffdc79b6f
commit
413ea9bc8e
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user