chore: reduce debt for args

This commit is contained in:
2025-11-10 16:05:15 +01:00
parent 4405203459
commit 1c737f4ac6
3 changed files with 10 additions and 10 deletions
+4 -4
View File
@@ -71,17 +71,17 @@ static void print_help(int status_code) {
exit(status_code);
}
static void invalid_arg(char *arg) {
static void invalid_arg(const char *arg) {
log_error("invalid argument: '%s'", arg);
print_help(EXIT_FAILURE);
}
static void invalid_value(char *arg, char *value) {
static void invalid_value(const char *arg, const char *value) {
log_error("invalid value for argument '%s': '%s'", arg, value);
print_help(EXIT_FAILURE);
}
static bool is_arg(char *arg, const char *ref) {
static bool is_arg(const char *arg, const char *ref) {
return strcoll(arg, ref) == 0;
}
@@ -93,7 +93,7 @@ static char *split_arg_value(char *arg) {
return rest;
}
static unsigned int parse_uint(char *arg, char *value) {
static unsigned int parse_uint(const char *arg, const char *value) {
unsigned long long tmp_value;
if (!string_is_number(value)) {