Fix minor code issues flagged by PVS-Studio and reported by alphrixus.

This commit is contained in:
Henrik Rydgård committed 2024-10-10 14:10:30 +02:00
1 parent 6c8dc94691
commit e51c58716b
11 files changed
+62 -64

No files matched your search

+1 -1
View File
@@ -181,7 +181,7 @@ void WebSocketInputState::ButtonsPress(DebuggerRequest &req) {
press.duration = 1;
if (!req.ParamU32("duration", &press.duration, false, DebuggerParamType::OPTIONAL))
return;
if (press.duration < 0)
if ((int)press.duration < 0)
return req.Fail("Parameter 'duration' must not be negative");
const JsonNode *value = req.data.get("ticket");
press.ticket = value ? json_stringify(value) : "";