rem: temphead = node;
add: { *temptail = node; temptail = &node->next; }
context: create_temp_file (FILE **pfp){  static char const slashbase[] = "/sortXXXXXX";  static size_t temp_dir_index;  sigset_t oldset;  int fd;  int saved_errno;  char const *temp_dir = temp_dirs[temp_dir_index];  size_t len = strlen (temp_dir);  struct tempnode *node =    (struct tempnode *) xmalloc (sizeof node->next + len + sizeof slashbase);  char *file = node->name;  memcpy (file, temp_dir, len);  memcpy (file + len, slashbase, sizeof slashbase);  node->next = temphead;  if (++temp_dir_index == temp_dir_count)    temp_dir_index = 0;  /* Create the temporary file in a critical section, to avoid races.  */  sigprocmask (SIG_BLOCK, &caught_signals, &oldset);  fd = mkstemp (file);  if (0 <= fd)    temphead = node;  saved_errno = errno;  sigprocmask (SIG_SETMASK, &oldset, NULL);  errno = saved_errno;  if (fd < 0 || (*pfp = fdopen (fd, "w")) == NULL)    die (_("cannot create temporary file"), file);  return file;}