summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorMukund Sivaraman <muks@banu.com>2009-11-17 02:40:03 +0530
committerMukund Sivaraman <muks@banu.com>2009-11-17 02:40:03 +0530
commitec4b4d979f90405ea455f7403860931511075751 (patch)
treee5769da489f343e647aafd2208029aee31db5a05 /src
parenta664dee4f66d0bf55ada7f038661ba119d2998db (diff)
Use NULL for pointers
Diffstat (limited to 'src')
-rw-r--r--src/conns.c3
-rw-r--r--src/reqs.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/conns.c b/src/conns.c
index 8796c13..94faeea 100644
--- a/src/conns.c
+++ b/src/conns.c
@@ -76,7 +76,8 @@ struct conn_s *initialize_conn (int client_fd, const char *ipaddr,
/* There is _no_ content length initially */
connptr->content_length.server = connptr->content_length.client = -1;
- connptr->server_ip_addr = sock_ipaddr ? safestrdup (sock_ipaddr) : 0;
+ connptr->server_ip_addr = (sock_ipaddr ?
+ safestrdup (sock_ipaddr) : NULL);
connptr->client_ip_addr = safestrdup (ipaddr);
connptr->client_string_addr = safestrdup (string_addr);
diff --git a/src/reqs.c b/src/reqs.c
index 9408ba1..fd6531f 100644
--- a/src/reqs.c
+++ b/src/reqs.c
@@ -1558,7 +1558,7 @@ void handle_connection (int fd)
fd, peer_string, peer_ipaddr, sock_ipaddr);
connptr = initialize_conn (fd, peer_ipaddr, peer_string,
- config.bindsame ? sock_ipaddr : 0);
+ config.bindsame ? sock_ipaddr : NULL);
if (!connptr) {
close (fd);
return;