mirror of
https://github.com/amnezia-vpn/amneziawg-tools.git
synced 2025-09-09 10:33:01 +02:00
fix: remove unused parse_uint32
This commit is contained in:
parent
5e882890fb
commit
591c28da24
1 changed files with 0 additions and 18 deletions
18
src/config.c
18
src/config.c
|
@ -458,24 +458,6 @@ static inline bool parse_uint16(uint16_t *device_value, const char *name, const
|
|||
return true;
|
||||
}
|
||||
|
||||
static inline bool parse_uint32(uint32_t *device_value, const char *name, const char *value) {
|
||||
|
||||
if (!strlen(value)) {
|
||||
fprintf(stderr, "Unable to parse empty string\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
char *end;
|
||||
uint64_t ret;
|
||||
ret = strtoul(value, &end, 10);
|
||||
if (*end || ret > UINT32_MAX) {
|
||||
fprintf(stderr, "Unable to parse %s: `%s'\n", name, value);
|
||||
exit(1);
|
||||
}
|
||||
*device_value = (uint32_t)ret;
|
||||
return true;
|
||||
}
|
||||
|
||||
static inline bool parse_bool(bool *device_value, const char *name, const char *value) {
|
||||
|
||||
if (!strlen(value)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue