+2080. [port] libbind: res_init.c did not compile on older versions
+ of Solaris. [RT #16363]
+
2079. [bug] The lame cache was not handling multiple types
correctly. [RT #16361]
#if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93";
-static const char rcsid[] = "$Id: res_init.c,v 1.20 2005/11/03 00:01:52 marka Exp $";
+static const char rcsid[] = "$Id: res_init.c,v 1.21 2006/08/30 23:14:17 marka Exp $";
#endif /* LIBC_SCCS and not lint */
#include "port_before.h"
if (buf[0] == '+')
buf[0] = '.';
cp = strchr(buf, '.');
- if (cp == NULL) {
- if (strlcpy(statp->defdname, buf,
- sizeof(statp->defdname))
- >= sizeof(statp->defdname))
- goto freedata;
- } else {
- if (strlcpy(statp->defdname, cp+1,
- sizeof(statp->defdname))
- >= sizeof(statp->defdname))
- goto freedata;
- }
+ cp = (cp == NULL) ? buf : (cp + 1);
+ if (strlen(cp) >= sizeof(statp->defdname))
+ goto freedata;
+ strcpy(statp->defdname, cp);
}
}
#endif /* SOLARIS2 */