mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-11-29 17:24:47 +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
|
||||
char* portNumberStart = strrchr(rtspSessionUrl, ':');
|
||||
const char* portNumberStart = strrchr(rtspSessionUrl, ':');
|
||||
if (portNumberStart == NULL) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -905,13 +905,13 @@ static bool parseUrlAddrFromRtspUrlString(const char* rtspUrlString, char* desti
|
||||
// a=x-nv-bwe.bwuSafeZoneLowLimit:70\r\n
|
||||
bool parseSdpAttributeToUInt(const char* payload, const char* name, uint32_t* val) {
|
||||
// Find the entry for the specified attribute name
|
||||
char* attribute = strstr(payload, name);
|
||||
const char* attribute = strstr(payload, name);
|
||||
if (!attribute) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Locate the start of the value
|
||||
char* valst = strstr(attribute, ":");
|
||||
const char* valst = strstr(attribute, ":");
|
||||
if (!valst) {
|
||||
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) {
|
||||
// Find the entry for the specified attribute name
|
||||
char* attribute = strstr(payload, name);
|
||||
const char* attribute = strstr(payload, name);
|
||||
if (!attribute) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Locate the start of the value
|
||||
char* valst = strstr(attribute, ":");
|
||||
const char* valst = strstr(attribute, ":");
|
||||
if (!valst) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user