aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2024-10-25 00:48:10 +0200
committerStefano Brivio <sbrivio@redhat.com>2024-10-30 12:37:31 +0100
commitb1a607fba11b3325117b76ffb41cc6edff774abf (patch)
treec4d867a3e0671bd8af63c32fced7f4fe6b6e79be
parent099ace64cedbf43922527dc7f132f0c0e65f308a (diff)
downloadpasst-b1a607fba11b3325117b76ffb41cc6edff774abf.tar
passt-b1a607fba11b3325117b76ffb41cc6edff774abf.tar.gz
passt-b1a607fba11b3325117b76ffb41cc6edff774abf.tar.bz2
passt-b1a607fba11b3325117b76ffb41cc6edff774abf.tar.lz
passt-b1a607fba11b3325117b76ffb41cc6edff774abf.tar.xz
passt-b1a607fba11b3325117b76ffb41cc6edff774abf.tar.zst
passt-b1a607fba11b3325117b76ffb41cc6edff774abf.zip
udp: Take care of cert-int09-c clang-tidy warning for enum udp_iov_idx
/home/sbrivio/passt/udp.c:171:1: error: inital values in enum 'udp_iov_idx' are not consistent, consider explicit initialization of all, none or only the first enumerator [cert-int09-c,readability-enum-initial-value,-warnings-as-errors] 171 | enum udp_iov_idx { | ^ 172 | UDP_IOV_TAP = 0, 173 | UDP_IOV_ETH = 1, 174 | UDP_IOV_IP = 2, 175 | UDP_IOV_PAYLOAD = 3, 176 | UDP_NUM_IOVS | | = 4 Don't initialise any value, so that it's obvious that constants map to unique values. Signed-off-by: Stefano Brivio <sbrivio@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
-rw-r--r--udp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/udp.c b/udp.c
index 100610f..0c01067 100644
--- a/udp.c
+++ b/udp.c
@@ -169,11 +169,11 @@ udp_meta[UDP_MAX_FRAMES];
* @UDP_NUM_IOVS the number of entries in the iovec array
*/
enum udp_iov_idx {
- UDP_IOV_TAP = 0,
- UDP_IOV_ETH = 1,
- UDP_IOV_IP = 2,
- UDP_IOV_PAYLOAD = 3,
- UDP_NUM_IOVS
+ UDP_IOV_TAP,
+ UDP_IOV_ETH,
+ UDP_IOV_IP,
+ UDP_IOV_PAYLOAD,
+ UDP_NUM_IOVS,
};
/* IOVs and msghdr arrays for receiving datagrams from sockets */