mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-11-30 01:34:05 +00:00
Fix C23 const correctness warnings
This commit is contained in:
1 parent
b4ee1cea3d
commit
b618ef2575
2 files changed
+5
-5
No files matched your search
+1
-1
@@ -191,7 +191,7 @@ static bool parseRtspPortNumberFromUrl(const char* rtspSessionUrl, uint16_t* por
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Pick the last colon in the string to match the port number
|
// Pick the last colon in the string to match the port number
|
||||||
char* portNumberStart = strrchr(rtspSessionUrl, ':');
|
const char* portNumberStart = strrchr(rtspSessionUrl, ':');
|
||||||
if (portNumberStart == NULL) {
|
if (portNumberStart == NULL) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -905,13 +905,13 @@ static bool parseUrlAddrFromRtspUrlString(const char* rtspUrlString, char* desti
|
|||||||
// a=x-nv-bwe.bwuSafeZoneLowLimit:70\r\n
|
// a=x-nv-bwe.bwuSafeZoneLowLimit:70\r\n
|
||||||
bool parseSdpAttributeToUInt(const char* payload, const char* name, uint32_t* val) {
|
bool parseSdpAttributeToUInt(const char* payload, const char* name, uint32_t* val) {
|
||||||
// Find the entry for the specified attribute name
|
// Find the entry for the specified attribute name
|
||||||
char* attribute = strstr(payload, name);
|
const char* attribute = strstr(payload, name);
|
||||||
if (!attribute) {
|
if (!attribute) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Locate the start of the value
|
// Locate the start of the value
|
||||||
char* valst = strstr(attribute, ":");
|
const char* valst = strstr(attribute, ":");
|
||||||
if (!valst) {
|
if (!valst) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -924,13 +924,13 @@ bool parseSdpAttributeToUInt(const char* payload, const char* name, uint32_t* va
|
|||||||
|
|
||||||
bool parseSdpAttributeToInt(const char* payload, const char* name, int* val) {
|
bool parseSdpAttributeToInt(const char* payload, const char* name, int* val) {
|
||||||
// Find the entry for the specified attribute name
|
// Find the entry for the specified attribute name
|
||||||
char* attribute = strstr(payload, name);
|
const char* attribute = strstr(payload, name);
|
||||||
if (!attribute) {
|
if (!attribute) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Locate the start of the value
|
// Locate the start of the value
|
||||||
char* valst = strstr(attribute, ":");
|
const char* valst = strstr(attribute, ":");
|
||||||
if (!valst) {
|
if (!valst) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user