while (fgets (buf, sizeof (buf), fp))
while (fgets_unlocked (buf, sizeof (buf), fp))
_res_hconf_init (void){  const char * hconf_name;  int line_num = 0;  char buf[256], * end, * envval;  FILE * fp;  memset (&_res_hconf, 0, sizeof (_res_hconf));  hconf_name = getenv (ENV_HOSTCONF);  if (!hconf_name)    hconf_name = _PATH_HOSTCONF;  fp = fopen (hconf_name, "r");  if (!fp)    /* make up something reasonable: */    _res_hconf.service[_res_hconf.num_services++] = SERVICE_BIND;  else    {      while (fgets (buf, sizeof (buf), fp))	{	  ++line_num;	  end = strchr (buf, '\n');	  if (end)	    *end = '\0';	  parse_line (hconf_name, line_num, buf);	}      fclose (fp);    }  envval = getenv (ENV_SERVORDER);  if (envval)    {      _res_hconf.num_services = 0;      arg_service_list (ENV_SERVORDER, 1, envval, 0);    }  envval = getenv (ENV_SPOOF);  if (envval)    arg_spoof (ENV_SPOOF, 1, envval, 0);  envval = getenv (ENV_MULTI);  if (envval)    arg_bool (ENV_MULTI, 1, envval, HCONF_FLAG_MULTI);  envval = getenv (ENV_REORDER);  if (envval)    arg_bool (ENV_REORDER, 1, envval, HCONF_FLAG_REORDER);  envval = getenv (ENV_TRIM_ADD);  if (envval)    arg_trimdomain_list (ENV_TRIM_ADD, 1, envval, 0);  envval = getenv (ENV_TRIM_OVERR);  if (envval)    {      _res_hconf.num_trimdomains = 0;      arg_trimdomain_list (ENV_TRIM_OVERR, 1, envval, 0);    }}