Merge pull request #30633 from mrc0mmand/cocci-shenanigans

coccinelle: rework how we run the Coccinelle transformations
This commit is contained in:
Yu Watanabe
2023-12-26 05:45:58 +09:00
committed by GitHub
21 changed files with 88 additions and 71 deletions
+1 -1
View File
@@ -257,7 +257,7 @@ static int killall(int sig, Set *pids, bool send_sighup) {
r = pidref_kill(&pidref, sig);
if (r < 0) {
if (errno != -ESRCH)
if (r != -ESRCH)
log_warning_errno(errno, "Could not kill " PID_FMT ", ignoring: %m", pidref.pid);
} else {
n_killed++;
+2 -5
View File
@@ -2059,7 +2059,7 @@ int tpm2_create_primary(
session ? session->esys_handle : ESYS_TR_PASSWORD,
ESYS_TR_NONE,
ESYS_TR_NONE,
sensitive ? sensitive : &(TPM2B_SENSITIVE_CREATE) {},
sensitive ?: &(TPM2B_SENSITIVE_CREATE) {},
template,
/* outsideInfo= */ NULL,
&(TPML_PCR_SELECTION) {},
@@ -5891,10 +5891,7 @@ int tpm2_unseal_data(
"Failed to unseal data: %s", sym_Tss2_RC_Decode(rc));
_cleanup_(iovec_done) struct iovec d = {};
d = (struct iovec) {
.iov_base = memdup(unsealed->buffer, unsealed->size),
.iov_len = unsealed->size,
};
d = IOVEC_MAKE(memdup(unsealed->buffer, unsealed->size), unsealed->size);
explicit_bzero_safe(unsealed->buffer, unsealed->size);