if (path[0] == '/') { path[n] = '\0'; return buf ?: (char *) realloc (path, (size_t) n + 1); } else no_new_dcache = 1;
no_new_dcache = 1;
__getcwd (char *buf, size_t size){  static int no_new_dcache = 0;  int save_errno;  char *path;  int n;  char *result;  size_t alloc_size = size;  if (no_new_dcache)    return generic_getcwd (buf, size);  if (size == 0)    {      if (buf != NULL)	{	  __set_errno (EINVAL);	  return NULL;	}      alloc_size = PATH_MAX + 1;    }  if (buf != NULL)    path = buf;  else    {      path = malloc (alloc_size);      if (path == NULL)	return NULL;    }  save_errno = errno;  n = __readlink ("/proc/self/cwd", path, alloc_size - 1);  if (n != -1)    {      if (n >= alloc_size - 1)	{	  if (size > 0)	    return NULL;	}      else	if (path[0] == '/')	  {	    path[n] = '\0';	    return buf ?: (char *) realloc (path, (size_t) n + 1);	  }	else	  no_new_dcache = 1;    }  /* Set to no_new_dcache only if error indicates that proc doesn't exist.  */  if (errno != EACCES && errno != ENAMETOOLONG)    no_new_dcache = 1;  /* Something went wrong.  Restore the error number and use the generic     version.  */  __set_errno (save_errno);  /* Don't put restrictions on the length of the path unless the user does.  */  if (size == 0)    {      free (path);      path = NULL;    }  result = generic_getcwd (path, size);  if (result == NULL && buf == NULL && size != 0)    free (path);  return result;}