network/routing-policy-rule: use int32_t for suppress_prefixlen
The kernel parses FRA_SUPPRESS_PREFIXLEN as uint32_t, but internally handled as signed integer and negative values as unset. Let's explicitly specify the size of the variable. No functional change, just refactoring.
This commit is contained in:
@@ -714,7 +714,7 @@ int parse_ip_port_range(const char *s, uint16_t *low, uint16_t *high, bool allow
|
||||
return 0;
|
||||
}
|
||||
|
||||
int parse_ip_prefix_length(const char *s, int *ret) {
|
||||
int parse_ip_prefix_length(const char *s, int32_t *ret) {
|
||||
unsigned l;
|
||||
int r;
|
||||
|
||||
@@ -725,7 +725,7 @@ int parse_ip_prefix_length(const char *s, int *ret) {
|
||||
if (l > 128)
|
||||
return -ERANGE;
|
||||
|
||||
*ret = (int) l;
|
||||
*ret = (int32_t) l;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user