merge strcpy_truncate branch
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5027 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -84,12 +84,10 @@ inaddr2str(struct in_addr addr, char *s, size_t len)
|
||||
if(h)
|
||||
while ((p = *(h->h_addr_list)++))
|
||||
if (memcmp (p, &addr, sizeof(addr)) == 0) {
|
||||
strncpy (s, h->h_name, len);
|
||||
s[len - 1] = '\0';
|
||||
strcpy_truncate (s, h->h_name, len);
|
||||
return;
|
||||
}
|
||||
}
|
||||
strncpy (s, inet_ntoa (addr), len);
|
||||
s[len - 1] = '\0';
|
||||
strcpy_truncate (s, inet_ntoa (addr), len);
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user