forgive any unknown trailing characters such as \n
git-svn-id: svn://svn.ircd-hybrid.org/svnroot/hopm/trunk@5185
82007160-df01-0410-b94d-
b575c5fd34c7
struct in_addr addr4;
struct in6_addr addr6;
char buf[1024];
+ char *p = NULL;
const char *file;
i6 = 0;
while (fgets(buf, 1024, f))
{
+ if ((p = strchr(buf, '\n')))
+ *p = '\0';
+
if (strncmp(buf, "nameserver", 10) == 0)
{
i = 10;
while (fgets(buf, 1024, f))
{
+ if ((p = strchr(buf, '\n')))
+ *p = '\0';
+
buf[strspn(buf, "0123456789.")] = '\0';
if (i6 < FDNS_MAX)