mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 19:34:43 +01:00
auditdistd: Use void pointers for opaque data
Use void, not char, for pointers to opaque data in our send and receive functions. Sponsored by: Klara, Inc. Sponsored by: Qualys, Inc. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D60728
This commit is contained in:
1 parent
a317317519
commit
4f19e4aca4
6 files changed
+14
-14
No files matched your search
@@ -89,7 +89,7 @@ proto_descriptor_send(int sock, int fd)
|
||||
}
|
||||
|
||||
int
|
||||
proto_common_send(int sock, const unsigned char *data, size_t size, int fd)
|
||||
proto_common_send(int sock, const void *data, size_t size, int fd)
|
||||
{
|
||||
ssize_t done;
|
||||
size_t sendsize;
|
||||
@@ -190,7 +190,7 @@ proto_descriptor_recv(int sock, int *fdp)
|
||||
}
|
||||
|
||||
int
|
||||
proto_common_recv(int sock, unsigned char *data, size_t size, int *fdp)
|
||||
proto_common_recv(int sock, void *data, size_t size, int *fdp)
|
||||
{
|
||||
ssize_t done;
|
||||
|
||||
|
||||
@@ -43,8 +43,8 @@ typedef int prt_connect_wait_t(void *, int);
|
||||
typedef int prt_server_t(const char *, void **);
|
||||
typedef int prt_accept_t(void *, void **);
|
||||
typedef int prt_wrap_t(int, bool, void **);
|
||||
typedef int prt_send_t(void *, const unsigned char *, size_t, int);
|
||||
typedef int prt_recv_t(void *, unsigned char *, size_t, int *);
|
||||
typedef int prt_send_t(void *, const void *, size_t, int);
|
||||
typedef int prt_recv_t(void *, void *, size_t, int *);
|
||||
typedef int prt_descriptor_t(const void *);
|
||||
typedef bool prt_address_match_t(const void *, const char *);
|
||||
typedef void prt_local_address_t(const void *, char *, size_t);
|
||||
@@ -75,7 +75,7 @@ void proto_register(struct proto *proto, bool isdefault);
|
||||
int proto_wrap(const char *protoname, bool client, int fd,
|
||||
struct proto_conn **newconnp);
|
||||
|
||||
int proto_common_send(int sock, const unsigned char *data, size_t size, int fd);
|
||||
int proto_common_recv(int sock, unsigned char *data, size_t size, int *fdp);
|
||||
int proto_common_send(int sock, const void *data, size_t size, int fd);
|
||||
int proto_common_recv(int sock, void *data, size_t size, int *fdp);
|
||||
|
||||
#endif /* !_PROTO_IMPL_H_ */
|
||||
@@ -109,7 +109,7 @@ sp_wrap(int fd, bool client, void **ctxp)
|
||||
}
|
||||
|
||||
static int
|
||||
sp_send(void *ctx, const unsigned char *data, size_t size, int fd)
|
||||
sp_send(void *ctx, const void *data, size_t size, int fd)
|
||||
{
|
||||
struct sp_ctx *spctx = ctx;
|
||||
int sock;
|
||||
@@ -148,7 +148,7 @@ sp_send(void *ctx, const unsigned char *data, size_t size, int fd)
|
||||
}
|
||||
|
||||
static int
|
||||
sp_recv(void *ctx, unsigned char *data, size_t size, int *fdp)
|
||||
sp_recv(void *ctx, void *data, size_t size, int *fdp)
|
||||
{
|
||||
struct sp_ctx *spctx = ctx;
|
||||
int sock;
|
||||
|
||||
@@ -494,7 +494,7 @@ tcp_wrap(int fd, bool client, void **ctxp)
|
||||
}
|
||||
|
||||
static int
|
||||
tcp_send(void *ctx, const unsigned char *data, size_t size, int fd)
|
||||
tcp_send(void *ctx, const void *data, size_t size, int fd)
|
||||
{
|
||||
struct tcp_ctx *tctx = ctx;
|
||||
|
||||
@@ -510,7 +510,7 @@ tcp_send(void *ctx, const unsigned char *data, size_t size, int fd)
|
||||
}
|
||||
|
||||
static int
|
||||
tcp_recv(void *ctx, unsigned char *data, size_t size, int *fdp)
|
||||
tcp_recv(void *ctx, void *data, size_t size, int *fdp)
|
||||
{
|
||||
struct tcp_ctx *tctx = ctx;
|
||||
|
||||
|
||||
@@ -870,7 +870,7 @@ tls_wrap(int fd, bool client, void **ctxp)
|
||||
}
|
||||
|
||||
static int
|
||||
tls_send(void *ctx, const unsigned char *data, size_t size, int fd)
|
||||
tls_send(void *ctx, const void *data, size_t size, int fd)
|
||||
{
|
||||
struct tls_ctx *tlsctx = ctx;
|
||||
|
||||
@@ -889,7 +889,7 @@ tls_send(void *ctx, const unsigned char *data, size_t size, int fd)
|
||||
}
|
||||
|
||||
static int
|
||||
tls_recv(void *ctx, unsigned char *data, size_t size, int *fdp)
|
||||
tls_recv(void *ctx, void *data, size_t size, int *fdp)
|
||||
{
|
||||
struct tls_ctx *tlsctx = ctx;
|
||||
|
||||
|
||||
@@ -227,7 +227,7 @@ uds_accept(void *ctx, void **newctxp)
|
||||
}
|
||||
|
||||
static int
|
||||
uds_send(void *ctx, const unsigned char *data, size_t size, int fd)
|
||||
uds_send(void *ctx, const void *data, size_t size, int fd)
|
||||
{
|
||||
struct uds_ctx *uctx = ctx;
|
||||
|
||||
@@ -239,7 +239,7 @@ uds_send(void *ctx, const unsigned char *data, size_t size, int fd)
|
||||
}
|
||||
|
||||
static int
|
||||
uds_recv(void *ctx, unsigned char *data, size_t size, int *fdp)
|
||||
uds_recv(void *ctx, void *data, size_t size, int *fdp)
|
||||
{
|
||||
struct uds_ctx *uctx = ctx;
|
||||
|
||||
|
||||
Reference in new issue
Block a user