tree-wide: code improvements suggested by Coccinelle
This commit is contained in:
@@ -37,7 +37,7 @@ int dns_label_unescape(const char **name, char *dest, size_t sz, DNSLabelFlags f
|
||||
d = dest;
|
||||
|
||||
for (;;) {
|
||||
if (*n == 0 || *n == '.') {
|
||||
if (IN_SET(*n, 0, '.')) {
|
||||
if (FLAGS_SET(flags, DNS_LABEL_LDH) && last_char == '-')
|
||||
/* Trailing dash */
|
||||
return -EINVAL;
|
||||
|
||||
@@ -395,7 +395,7 @@ static int image_make(
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
if (size != 0 && size != UINT64_MAX)
|
||||
if (!IN_SET(size, 0, UINT64_MAX))
|
||||
(*ret)->usage = (*ret)->usage_exclusive = (*ret)->limit = (*ret)->limit_exclusive = size;
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user