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:
Lennart Poettering
2019-07-12 16:40:10 +02:00
parent 6fb0569065
commit 2caa38e99f
10 changed files with 30 additions and 12 deletions
+2
View File
@@ -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;