memcpy (buffer, name, diff - 1); buffer[diff - 1] = '\0';
*((char *) __mempcpy (buffer, name, diff - 1)) = '\0';
nis_name_of_r (const_nis_name name, char *buffer, size_t buflen){  char *local_domain;  int diff;  local_domain = nis_local_directory ();  diff = strlen (name) - strlen (local_domain);  if (diff <= 0)    return NULL;  if (strcmp (&name[diff], local_domain) != 0)    return NULL;  if ((size_t) diff >= buflen)    {      errno = ERANGE;      return NULL;    }  memcpy (buffer, name, diff - 1);  buffer[diff - 1] = '\0';  if (diff - 1 == 0)    return NULL;  return buffer;}