clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository[1] and reformat
the repository.
[1] https://gerrit.openbmc.org/c/openbmc/docs/+/63441
Further, shift the fixup for C's `_Static_assert` into src/msgbuf.h to
prevent a clang-tidy-16 error:
```
/data0/jenkins/workspace/ci-repository/openbmc/libpldm/src/msgbuf.h:315:2: error: '_Static_assert' is a C11 extension [clang-diagnostic-c11-extensions,-warnings-as-errors]
_Static_assert(sizeof(*dst) == sizeof(ldst),
^
```
And fix up the function prototype in the definition of `pldm_open()`:
```
../src/requester/pldm.c:128:16: error: a function declaration without a prototype is deprecated in all versions of C [clang-diagnostic-strict-prototypes,-warnings-as-errors]
void pldm_close()
^
void
```
Change-Id: I57b53f51914e39237e733d024e62ab41b3d306c1
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/src/transport/af-mctp.c b/src/transport/af-mctp.c
index 21d2c72..f499a72 100644
--- a/src/transport/af-mctp.c
+++ b/src/transport/af-mctp.c
@@ -108,7 +108,7 @@
return PLDM_REQUESTER_SEND_FAIL;
}
- struct sockaddr_mctp addr = {0};
+ struct sockaddr_mctp addr = { 0 };
addr.smctp_family = AF_MCTP;
addr.smctp_addr.s_addr = eid;
addr.smctp_type = MCTP_MSG_TYPE_PLDM;
@@ -129,7 +129,7 @@
}
struct pldm_transport_af_mctp *af_mctp =
- calloc(1, sizeof(struct pldm_transport_af_mctp));
+ calloc(1, sizeof(struct pldm_transport_af_mctp));
if (!af_mctp) {
return -ENOMEM;
}