Add missing consts
String parsing functions should not be able to modify their input.
This commit is contained in:
parent
419c869c9c
commit
1eae139b6e
1 changed files with 4 additions and 4 deletions
|
@ -234,7 +234,7 @@ parse_bit_rate(const char *s, uint32_t *bit_rate) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
parse_max_size(char *s, uint16_t *max_size) {
|
parse_max_size(const char *s, uint16_t *max_size) {
|
||||||
long value;
|
long value;
|
||||||
bool ok = parse_integer_arg(s, &value, false, 0, 0xFFFF, "max size");
|
bool ok = parse_integer_arg(s, &value, false, 0, 0xFFFF, "max size");
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
|
@ -258,7 +258,7 @@ parse_max_fps(const char *s, uint16_t *max_fps) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
parse_window_position(char *s, int16_t *position) {
|
parse_window_position(const char *s, int16_t *position) {
|
||||||
long value;
|
long value;
|
||||||
bool ok = parse_integer_arg(s, &value, false, -1, 0x7FFF,
|
bool ok = parse_integer_arg(s, &value, false, -1, 0x7FFF,
|
||||||
"window position");
|
"window position");
|
||||||
|
@ -271,7 +271,7 @@ parse_window_position(char *s, int16_t *position) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
parse_window_dimension(char *s, uint16_t *dimension) {
|
parse_window_dimension(const char *s, uint16_t *dimension) {
|
||||||
long value;
|
long value;
|
||||||
bool ok = parse_integer_arg(s, &value, false, 0, 0xFFFF,
|
bool ok = parse_integer_arg(s, &value, false, 0, 0xFFFF,
|
||||||
"window dimension");
|
"window dimension");
|
||||||
|
@ -284,7 +284,7 @@ parse_window_dimension(char *s, uint16_t *dimension) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
parse_port(char *s, uint16_t *port) {
|
parse_port(const char *s, uint16_t *port) {
|
||||||
long value;
|
long value;
|
||||||
bool ok = parse_integer_arg(s, &value, false, 0, 0xFFFF, "port");
|
bool ok = parse_integer_arg(s, &value, false, 0, 0xFFFF, "port");
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
|
|
Loading…
Reference in a new issue