Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d58911f
)
Typo. Shouldn't depend on assert().
author
Martin Pool
<mbp@samba.org>
Wed, 15 Aug 2001 05:47:29 +0000
(
05:47
+0000)
committer
Martin Pool
<mbp@samba.org>
Wed, 15 Aug 2001 05:47:29 +0000
(
05:47
+0000)
socket.c
patch
|
blob
|
blame
|
history
diff --git
a/socket.c
b/socket.c
index
23292cd
..
5860ce7
100644
(file)
--- a/
socket.c
+++ b/
socket.c
@@
-496,7
+496,7
@@
char *client_name(int fd)
hp = gethostbyname(name_buf);
if (!hp) {
strcpy (name_buf,def);
hp = gethostbyname(name_buf);
if (!hp) {
strcpy (name_buf,def);
- rprint (FERROR, "reverse name lookup for \"%s\" failed\n",
+ rprint
f
(FERROR, "reverse name lookup for \"%s\" failed\n",
name_buf);
} else {
for (p=hp->h_addr_list;*p;p++) {
name_buf);
} else {
for (p=hp->h_addr_list;*p;p++) {
@@
-525,7
+525,10
@@
struct in_addr *ip_address(const char *str)
static struct in_addr ret;
struct hostent *hp;
static struct in_addr ret;
struct hostent *hp;
- assert (str);
+ if (!str) {
+ rprintf (FERROR, "ip_address received NULL name\n");
+ return NULL;
+ }
/* try as an IP address */
if (inet_aton(str, &ret) != 0) {
/* try as an IP address */
if (inet_aton(str, &ret) != 0) {