static int load_link(link_config_ctx *ctx, const char *filename) {
link_config *link;
- FILE *file;
+ _cleanup_fclose_ FILE *file;
int r;
file = fopen(filename, "re");
return true;
FOREACH_WORD_QUOTED(w, l, line, state)
- if (l == sizeof("net.ifnames=0") - 1 && strneq(w, "net.ifnames=0", l))
+ if (strneq(w, "net.ifnames=0", l))
return false;
return true;
srandom(seed);
- for(i = 0; i < ETH_ALEN; i++) {
+ for (i = 0; i < ETH_ALEN; i++) {
mac->ether_addr_octet[i] = random();
}