Minor RTSP code cleanup
This commit is contained in:
parent
9ffdc79b6f
commit
413ea9bc8e
1 changed files with 0 additions and 11 deletions
|
|
@ -20,13 +20,6 @@ static ENetPeer* peer;
|
||||||
#define CHAR_TO_INT(x) ((x) - '0')
|
#define CHAR_TO_INT(x) ((x) - '0')
|
||||||
#define CHAR_IS_DIGIT(x) ((x) >= '0' && (x) <= '9')
|
#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
|
// Create RTSP Option
|
||||||
static POPTION_ITEM createOptionItem(char* option, char* content)
|
static POPTION_ITEM createOptionItem(char* option, char* content)
|
||||||
{
|
{
|
||||||
|
|
@ -41,8 +34,6 @@ static POPTION_ITEM createOptionItem(char* option, char* content)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
strcpy(item->option, option);
|
|
||||||
|
|
||||||
item->content = strdup(content);
|
item->content = strdup(content);
|
||||||
if (item->content == NULL) {
|
if (item->content == NULL) {
|
||||||
free(item->option);
|
free(item->option);
|
||||||
|
|
@ -50,8 +41,6 @@ static POPTION_ITEM createOptionItem(char* option, char* content)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
strcpy(item->content, content);
|
|
||||||
|
|
||||||
item->next = NULL;
|
item->next = NULL;
|
||||||
item->flags = FLAG_ALLOCATED_OPTION_FIELDS;
|
item->flags = FLAG_ALLOCATED_OPTION_FIELDS;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue