mirror of
https://github.com/aaru-dps/aaruremote.git
synced 2025-12-16 19:24:37 +00:00
Remove unneeded slim functions.
This commit is contained in:
@@ -59,9 +59,9 @@ char* PrintIpv4Address(struct in_addr addr) { return inet_ntoa(addr); }
|
||||
|
||||
void* NetSocket(uint32_t domain, uint32_t type, uint32_t protocol)
|
||||
{
|
||||
UnixNetworkContext* ctx;
|
||||
NetworkContext* ctx;
|
||||
|
||||
ctx = malloc(sizeof(UnixNetworkContext));
|
||||
ctx = malloc(sizeof(NetworkContext));
|
||||
|
||||
if(!ctx) return NULL;
|
||||
|
||||
@@ -78,7 +78,7 @@ void* NetSocket(uint32_t domain, uint32_t type, uint32_t protocol)
|
||||
|
||||
int32_t NetBind(void* net_ctx, struct sockaddr* addr, socklen_t addrlen)
|
||||
{
|
||||
UnixNetworkContext* ctx = net_ctx;
|
||||
NetworkContext* ctx = net_ctx;
|
||||
|
||||
if(!ctx) return -1;
|
||||
|
||||
@@ -87,7 +87,7 @@ int32_t NetBind(void* net_ctx, struct sockaddr* addr, socklen_t addrlen)
|
||||
|
||||
int32_t NetListen(void* net_ctx, uint32_t backlog)
|
||||
{
|
||||
UnixNetworkContext* ctx = net_ctx;
|
||||
NetworkContext* ctx = net_ctx;
|
||||
|
||||
if(!ctx) return -1;
|
||||
|
||||
@@ -96,12 +96,12 @@ int32_t NetListen(void* net_ctx, uint32_t backlog)
|
||||
|
||||
void* NetAccept(void* net_ctx, struct sockaddr* addr, socklen_t* addrlen)
|
||||
{
|
||||
UnixNetworkContext* ctx = net_ctx;
|
||||
UnixNetworkContext* cli_ctx;
|
||||
NetworkContext* ctx = net_ctx;
|
||||
NetworkContext* cli_ctx;
|
||||
|
||||
if(!ctx) return NULL;
|
||||
|
||||
cli_ctx = malloc(sizeof(UnixNetworkContext));
|
||||
cli_ctx = malloc(sizeof(NetworkContext));
|
||||
|
||||
if(!cli_ctx) return NULL;
|
||||
|
||||
@@ -118,7 +118,7 @@ void* NetAccept(void* net_ctx, struct sockaddr* addr, socklen_t* addrlen)
|
||||
|
||||
int32_t NetRecv(void* net_ctx, void* buf, int32_t len, uint32_t flags)
|
||||
{
|
||||
UnixNetworkContext* ctx = net_ctx;
|
||||
NetworkContext* ctx = net_ctx;
|
||||
|
||||
if(!ctx) return -1;
|
||||
|
||||
@@ -141,7 +141,7 @@ int32_t NetRecv(void* net_ctx, void* buf, int32_t len, uint32_t flags)
|
||||
|
||||
int32_t NetWrite(void* net_ctx, const void* buf, int32_t size)
|
||||
{
|
||||
UnixNetworkContext* ctx = net_ctx;
|
||||
NetworkContext* ctx = net_ctx;
|
||||
|
||||
if(!ctx) return -1;
|
||||
|
||||
@@ -150,8 +150,8 @@ int32_t NetWrite(void* net_ctx, const void* buf, int32_t size)
|
||||
|
||||
int32_t NetClose(void* net_ctx)
|
||||
{
|
||||
int ret;
|
||||
UnixNetworkContext* ctx = net_ctx;
|
||||
int ret;
|
||||
NetworkContext* ctx = net_ctx;
|
||||
|
||||
if(!ctx) return -1;
|
||||
|
||||
|
||||
@@ -21,6 +21,6 @@
|
||||
typedef struct
|
||||
{
|
||||
int fd;
|
||||
} UnixNetworkContext;
|
||||
} NetworkContext;
|
||||
|
||||
#endif // AARUREMOTE_UNIX_UNIX_H_
|
||||
|
||||
Reference in New Issue
Block a user