aboutgitcodebugslistschat
path: root/util.h
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2021-10-20 00:05:11 +0200
committerStefano Brivio <sbrivio@redhat.com>2021-10-20 08:34:22 +0200
commit12cfa6444cd239dbc04391027ad3161f53b6901c (patch)
tree3fa746cef0cf3f543ebbe2e0d1535a331a1f2bd0 /util.h
parent7f1e7019cbd47a13dde38782d4bc7430cecff8c4 (diff)
downloadpasst-12cfa6444cd239dbc04391027ad3161f53b6901c.tar
passt-12cfa6444cd239dbc04391027ad3161f53b6901c.tar.gz
passt-12cfa6444cd239dbc04391027ad3161f53b6901c.tar.bz2
passt-12cfa6444cd239dbc04391027ad3161f53b6901c.tar.lz
passt-12cfa6444cd239dbc04391027ad3161f53b6901c.tar.xz
passt-12cfa6444cd239dbc04391027ad3161f53b6901c.tar.zst
passt-12cfa6444cd239dbc04391027ad3161f53b6901c.zip
passt: Add clang-tidy Makefile target and test, take care of warnings
Most are just about style and form, but a few were actually serious mistakes (NDP-related). Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'util.h')
-rw-r--r--util.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/util.h b/util.h
index 44ba980..1fc2983 100644
--- a/util.h
+++ b/util.h
@@ -36,7 +36,7 @@ void debug(const char *format, ...);
#define SWAP(a, b) \
do { \
- typeof(a) __x = (a); (a) = (b); (b) = __x; \
+ __typeof__(a) __x = (a); (a) = (b); (b) = __x; \
} while (0) \
#define STRINGIFY(x) #x
@@ -152,7 +152,7 @@ enum bind_type {
struct ctx;
void __openlog(const char *ident, int option, int facility);
-void passt_vsyslog(int pri, const char *fmt, va_list ap);
+void passt_vsyslog(int pri, const char *format, va_list ap);
void __setlogmask(int mask);
char *ipv6_l4hdr(struct ipv6hdr *ip6h, uint8_t *proto);
int sock_l4(struct ctx *c, int af, uint8_t proto, uint16_t port,
@@ -161,7 +161,7 @@ void sock_probe_mem(struct ctx *c);
int timespec_diff_ms(struct timespec *a, struct timespec *b);
void bitmap_set(uint8_t *map, int bit);
void bitmap_clear(uint8_t *map, int bit);
-int bitmap_isset(uint8_t *map, int bit);
+int bitmap_isset(const uint8_t *map, int bit);
char *line_read(char *buf, size_t len, int fd);
void procfs_scan_listen(char *name, uint8_t *map, uint8_t *exclude);
int ns_enter(struct ctx *c);