tree-wide: some more [static] related fixes
let's add [static] where it was missing so far Drop [static] on parameters that can be NULL. Add an assert() around parameters that have [static] and can't be NULL hence. Add some "const" where it was forgotten.
This commit is contained in:
@@ -652,6 +652,8 @@ int ethtool_set_glinksettings(
|
||||
struct ifreq ifr = {};
|
||||
int r;
|
||||
|
||||
assert(advertise);
|
||||
|
||||
if (autonegotiation != AUTONEG_DISABLE && memeqzero(advertise, sizeof(uint32_t) * N_ADVERTISE)) {
|
||||
log_info("ethtool: autonegotiation is unset or enabled, the speed and duplex are not writable.");
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user