Skip to content

Commit

Permalink
Fix warning from inconsistent socket_pair prototype.
Browse files Browse the repository at this point in the history
  • Loading branch information
gdamore committed Jan 7, 2024
1 parent f4908da commit 5e41f10
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/core/platform.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright 2021 Staysail Systems, Inc. <[email protected]>
// Copyright 2024 Staysail Systems, Inc. <[email protected]>
// Copyright 2018 Capitar IT Group BV <[email protected]>
// Copyright 2018 Devolutions <[email protected]>
//
Expand Down Expand Up @@ -445,7 +445,7 @@ extern int nni_plat_udp_sockname(nni_plat_udp *, nni_sockaddr *);
// in APIs to transport file descriptors, or across a fork/exec boundary (so
// that child processes may use these with socket to inherit a socket that is
// connected to the parent.)
extern int nni_socket_pair(int *);
extern int nni_socket_pair(int [2]);

//
// File/Store Support
Expand Down
4 changes: 2 additions & 2 deletions src/platform/posix/posix_socketpair.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ nni_socket_pair(int fds[2])
}
#else
int
nni_socket_pair(int *fds)
nni_socket_pair(int fds[2])
{
return (NNG_ENOTSUP);
}
#endif
#endif
2 changes: 1 addition & 1 deletion src/platform/windows/win_socketpair.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <sys/socket.h>

int
nni_socket_pair(int *fds)
nni_socket_pair(int fds[2])
{
int rv;
rv = socketpair(PF_UNIX, SOCK_STREAM, 0, fds);
Expand Down
6 changes: 3 additions & 3 deletions src/supplemental/util/platform.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright 2021 Staysail Systems, Inc. <[email protected]>
// Copyright 2024 Staysail Systems, Inc. <[email protected]>
// Copyright 2018 Capitar IT Group BV <[email protected]>
//
// This software is supplied under the terms of the MIT License, a
Expand Down Expand Up @@ -166,7 +166,7 @@ nng_random(void)
}

int
nng_socket_pair(int *fds)
nng_socket_pair(int fds[2])
{
return (nni_socket_pair(fds));
}
}

0 comments on commit 5e41f10

Please sign in to comment.