To avoid warnings on some compilers, return NDN_ERROR_success instead of 0.
diff --git a/ndn-cpp/c/transport/socket-transport.c b/ndn-cpp/c/transport/socket-transport.c
index b4ded31..d48c794 100644
--- a/ndn-cpp/c/transport/socket-transport.c
+++ b/ndn-cpp/c/transport/socket-transport.c
@@ -62,7 +62,7 @@
freeaddrinfo(serverInfo);
self->socketDescriptor = socketDescriptor;
- return 0;
+ return NDN_ERROR_success;
}
ndn_Error ndn_SocketTransport_send(struct ndn_SocketTransport *self, unsigned char *data, unsigned int dataLength)
@@ -81,7 +81,7 @@
dataLength -= nBytes;
}
- return 0;
+ return NDN_ERROR_success;
}
ndn_Error ndn_SocketTransport_receive
@@ -96,19 +96,19 @@
*nBytesOut = (unsigned int)nBytes;
- return 0;
+ return NDN_ERROR_success;
}
ndn_Error ndn_SocketTransport_close(struct ndn_SocketTransport *self)
{
if (self->socketDescriptor < 0)
// Already closed. Do nothing.
- return 0;
+ return NDN_ERROR_success;
if (close(self->socketDescriptor) != 0)
return NDN_ERROR_SocketTransport_error_in_close;
self->socketDescriptor = -1;
- return 0;
+ return NDN_ERROR_success;
}