tree-wide: assorted coccinelle fixes

This commit is contained in:
Frantisek Sumsal
2020-10-09 15:02:23 +02:00
parent 44e66de0f2
commit d7a0f1f4f9
56 changed files with 351 additions and 399 deletions
+3 -4
View File
@@ -194,10 +194,9 @@ static int show_status(int argc, char **argv, void *userdata) {
if (arg_pretty || arg_static || arg_transient) {
const char *attr;
if (!!arg_static + !!arg_pretty + !!arg_transient > 1) {
log_error("Cannot query more than one name type at a time");
return -EINVAL;
}
if (!!arg_static + !!arg_pretty + !!arg_transient > 1)
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
"Cannot query more than one name type at a time");
attr = arg_pretty ? "PrettyHostname" :
arg_static ? "StaticHostname" : "Hostname";