@@ -274,7 +274,7 @@ static struct pingpong_dest *pp_server_exch_dest(struct pingpong_context *ctx,
}
listen(sockfd, 1);
- connfd = accept(sockfd, NULL, 0);
+ connfd = accept(sockfd, NULL, NULL);
close(sockfd);
if (connfd < 0) {
fprintf(stderr, "accept() failed\n");
@@ -284,7 +284,7 @@ static struct pingpong_dest *pp_server_exch_dest(struct pingpong_context *ctx,
}
listen(sockfd, 1);
- connfd = accept(sockfd, NULL, 0);
+ connfd = accept(sockfd, NULL, NULL);
close(sockfd);
if (connfd < 0) {
fprintf(stderr, "accept() failed\n");
@@ -248,7 +248,7 @@ static struct pingpong_dest *pp_server_exch_dest(struct pingpong_context *ctx,
}
listen(sockfd, 1);
- connfd = accept(sockfd, NULL, 0);
+ connfd = accept(sockfd, NULL, NULL);
close(sockfd);
if (connfd < 0) {
fprintf(stderr, "accept() failed\n");
@@ -246,7 +246,7 @@ static struct pingpong_dest *pp_server_exch_dest(struct pingpong_context *ctx,
}
listen(sockfd, 1);
- connfd = accept(sockfd, NULL, 0);
+ connfd = accept(sockfd, NULL, NULL);
close(sockfd);
if (connfd < 0) {
fprintf(stderr, "accept() failed\n");
@@ -633,7 +633,7 @@ static int pp_server_connect(int port)
listen(sockfd, ctx.num_clients);
for (i = 0; i < ctx.num_clients; i++) {
- connfd = accept(sockfd, NULL, 0);
+ connfd = accept(sockfd, NULL, NULL);
if (connfd < 0) {
fprintf(stderr, "accept() failed for client %d\n", i);
return 1;
@@ -119,8 +119,8 @@ static int init_node(struct cmatest_node *node)
}
cqe = message_count ? message_count : 1;
- node->cq[SEND_CQ_INDEX] = ibv_create_cq(node->cma_id->verbs, cqe, node, 0, 0);
- node->cq[RECV_CQ_INDEX] = ibv_create_cq(node->cma_id->verbs, cqe, node, 0, 0);
+ node->cq[SEND_CQ_INDEX] = ibv_create_cq(node->cma_id->verbs, cqe, node, NULL, 0);
+ node->cq[RECV_CQ_INDEX] = ibv_create_cq(node->cma_id->verbs, cqe, node, NULL, 0);
if (!node->cq[SEND_CQ_INDEX] || !node->cq[RECV_CQ_INDEX]) {
ret = -ENOMEM;
printf("cmatose: unable to create CQ\n");
@@ -140,7 +140,7 @@ static int init_node(struct cmatest_node *node)
}
cqe = message_count ? message_count * 2 : 2;
- node->cq = ibv_create_cq(node->cma_id->verbs, cqe, node, 0, 0);
+ node->cq = ibv_create_cq(node->cma_id->verbs, cqe, node, NULL, 0);
if (!node->cq) {
ret = -ENOMEM;
printf("mckey: unable to create CQ\n");
@@ -278,7 +278,7 @@ static void server_close(int rs, struct msg_hdr *msg)
if (file_addr) {
munmap(file_addr, bytes);
- file_addr = 0;
+ file_addr = NULL;
}
if (fd > 0) {
@@ -422,7 +422,7 @@ static int server_connect(void)
}
}
- rs = raccept(lrs, NULL, 0);
+ rs = raccept(lrs, NULL, NULL);
} while (rs < 0 && (errno == EAGAIN || errno == EWOULDBLOCK));
if (rs < 0) {
perror("raccept");
@@ -386,7 +386,7 @@ static int server_connect(void)
}
}
- rs = rs_accept(lrs, NULL, 0);
+ rs = rs_accept(lrs, NULL, NULL);
} while (rs < 0 && (errno == EAGAIN || errno == EWOULDBLOCK));
if (rs < 0) {
perror("raccept");
@@ -135,7 +135,7 @@ static int init_node(struct cmatest_node *node)
}
cqe = message_count ? message_count * 2 : 2;
- node->cq = ibv_create_cq(node->cma_id->verbs, cqe, node, 0, 0);
+ node->cq = ibv_create_cq(node->cma_id->verbs, cqe, node, NULL, 0);
if (!node->cq) {
ret = -ENOMEM;
printf("udaddy: unable to create CQ\n");
@@ -2420,7 +2420,7 @@ ssize_t rrecv(int socket, void *buf, size_t len, int flags)
rs = idm_at(&idm, socket);
if (rs->type == SOCK_DGRAM) {
fastlock_acquire(&rs->rlock);
- ret = ds_recvfrom(rs, buf, len, flags, NULL, 0);
+ ret = ds_recvfrom(rs, buf, len, flags, NULL, NULL);
fastlock_release(&rs->rlock);
return ret;
}
@@ -291,9 +291,9 @@ int main(int argc, char *argv[])
while (1) {
int opt_idx = 0;
static struct option long_opts[] = {
- {"foreground", 0, 0, 'f' },
- {"help", 0, 0, 'h' },
- {"debug", 0, 0, 'd' },
+ {"foreground", 0, NULL, 'f' },
+ {"help", 0, NULL, 'h' },
+ {"debug", 0, NULL, 'd' },
{ }
};
Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> --- libibverbs/examples/rc_pingpong.c | 2 +- libibverbs/examples/srq_pingpong.c | 2 +- libibverbs/examples/uc_pingpong.c | 2 +- libibverbs/examples/ud_pingpong.c | 2 +- libibverbs/examples/xsrq_pingpong.c | 2 +- librdmacm/examples/cmatose.c | 4 ++-- librdmacm/examples/mckey.c | 2 +- librdmacm/examples/rcopy.c | 2 +- librdmacm/examples/riostream.c | 2 +- librdmacm/examples/rstream.c | 2 +- librdmacm/examples/udaddy.c | 2 +- librdmacm/rsocket.c | 2 +- rdma-ndd/rdma-ndd.c | 6 +++--- 13 files changed, 16 insertions(+), 16 deletions(-)