diff options
author | trawick <trawick@13f79535-47bb-0310-9956-ffa450edef68> | 2000-06-15 00:07:22 +0000 |
---|---|---|
committer | trawick <trawick@13f79535-47bb-0310-9956-ffa450edef68> | 2000-06-15 00:07:22 +0000 |
commit | e7722159d1fdcf0e90f1d9ee345ce5fd8a582ec1 (patch) | |
tree | 29611e92ee893ec5e89301d3f794e51eb82fddd6 /network_io | |
parent | 1aec41aed99f7f62ab6b486c2838d97ac77aaa42 (diff) | |
download | libapr-e7722159d1fdcf0e90f1d9ee345ce5fd8a582ec1.tar.gz |
Get rid of some unnecessary parameter checking (let it segfault).
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60205 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'network_io')
-rw-r--r-- | network_io/unix/sockets.c | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/network_io/unix/sockets.c b/network_io/unix/sockets.c index 2f14cdc25..ba0d24355 100644 --- a/network_io/unix/sockets.c +++ b/network_io/unix/sockets.c @@ -208,32 +208,17 @@ ap_status_t ap_connect(ap_socket_t *sock, char *hostname) ap_status_t ap_get_socketdata(void **data, char *key, ap_socket_t *sock) { - if (sock != NULL) { - return ap_get_userdata(data, key, sock->cntxt); - } - else { - data = NULL; - return APR_ENOSOCKET; - } + return ap_get_userdata(data, key, sock->cntxt); } ap_status_t ap_set_socketdata(ap_socket_t *sock, void *data, char *key, ap_status_t (*cleanup) (void *)) { - if (sock != NULL) { - return ap_set_userdata(data, key, cleanup, sock->cntxt); - } - else { - data = NULL; - return APR_ENOSOCKET; - } + return ap_set_userdata(data, key, cleanup, sock->cntxt); } ap_status_t ap_get_os_sock(ap_os_sock_t *thesock, ap_socket_t *sock) { - if (sock == NULL) { - return APR_ENOSOCKET; - } *thesock = sock->socketdes; return APR_SUCCESS; } @@ -241,9 +226,6 @@ ap_status_t ap_get_os_sock(ap_os_sock_t *thesock, ap_socket_t *sock) ap_status_t ap_put_os_sock(ap_socket_t **sock, ap_os_sock_t *thesock, ap_pool_t *cont) { - if (cont == NULL) { - return APR_ENOPOOL; - } if ((*sock) == NULL) { (*sock) = (ap_socket_t *)ap_pcalloc(cont, sizeof(ap_socket_t)); (*sock)->cntxt = cont; |