diff options
author | harti <harti@FreeBSD.org> | 2003-07-29 13:35:03 +0000 |
---|---|---|
committer | harti <harti@FreeBSD.org> | 2003-07-29 13:35:03 +0000 |
commit | 651b54f4726197de352365675e3c76551409d5d3 (patch) | |
tree | 6127c580673b53233ee74bf74702ed9dffd1e03b /lib/libatm/ip_addr.c | |
parent | 7708c2e2d094277a614ab5b842d23b184a061584 (diff) | |
download | FreeBSD-src-651b54f4726197de352365675e3c76551409d5d3.zip FreeBSD-src-651b54f4726197de352365675e3c76551409d5d3.tar.gz |
Use the appropriate [s]size_t type where a buffer size is meant.
Add const specifiers to constant function arguments.
Diffstat (limited to 'lib/libatm/ip_addr.c')
-rw-r--r-- | lib/libatm/ip_addr.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/libatm/ip_addr.c b/lib/libatm/ip_addr.c index 42f734a..46504d7 100644 --- a/lib/libatm/ip_addr.c +++ b/lib/libatm/ip_addr.c @@ -69,8 +69,7 @@ __FBSDID("$FreeBSD$"); * */ struct sockaddr_in * -get_ip_addr(p) - char *p; +get_ip_addr(const char *p) { struct hostent *ip_host; static struct sockaddr_in s; @@ -117,8 +116,7 @@ get_ip_addr(p) * */ const char * -format_ip_addr(addr) - struct in_addr *addr; +format_ip_addr(const struct in_addr *addr) { static char host_name[128]; char *ip_num; @@ -144,7 +142,7 @@ format_ip_addr(addr) /* * Look up name in DNS */ - ip_host = gethostbyaddr((char *)addr, sizeof(addr), AF_INET); + ip_host = gethostbyaddr((const char *)addr, sizeof(addr), AF_INET); if (ip_host && ip_host->h_name && strlen(ip_host->h_name)) { /* |