rem: int new_file;
add: bool new_file; int fd = (is_stdin ? STDIN_FILENO : open_safer (f->name, O_RDONLY | (blocking ? 0 : O_NONBLOCK)));
context: recheck (struct File_spec *f){  /* open/fstat the file and announce if dev/ino have changed */  struct stat new_stats;  int fd;  int fail = 0;  int is_stdin = (STREQ (f->name, "-"));  int was_tailable = f->tailable;  int prev_errnum = f->errnum;  int new_file;  assert (valid_file_spec (f));  fd = (is_stdin ? STDIN_FILENO : open (f->name, O_RDONLY));  /* If the open fails because the file doesn't exist,     then mark the file as not tailable.  */  f->tailable = !(reopen_inaccessible_files && fd == -1);  if (fd == -1 || fstat (fd, &new_stats) < 0)    {      fail = 1;      f->errnum = errno;      if (!f->tailable)	{	  if (was_tailable)	    {	      /* FIXME-maybe: detect the case in which the file first becomes		 unreadable (perms), and later becomes readable again and can		 be seen to be the same file (dev/ino).  Otherwise, tail prints		 the entire contents of the file when it becomes readable.  */	      error (0, f->errnum, _("`%s' has become inaccessible"),		     pretty_name (f));	    }	  else	    {	      /* say nothing... it's still not tailable */	    }	}      else if (prev_errnum != errno)	{	  error (0, errno, "%s", pretty_name (f));	}    }  else if (!IS_TAILABLE_FILE_TYPE (new_stats.st_mode))    {      fail = 1;      f->errnum = -1;      error (0, 0, _("`%s' has been replaced with an untailable file;\ giving up on this name"),	     pretty_name (f));      f->ignore = 1;    }  else    {      f->errnum = 0;    }  new_file = 0;  if (fail)    {      close_fd (fd, pretty_name (f));      close_fd (f->fd, pretty_name (f));      f->fd = -1;    }  else if (prev_errnum && prev_errnum != ENOENT)    {      new_file = 1;      assert (f->fd == -1);      error (0, 0, _("`%s' has become accessible"), pretty_name (f));    }  else if (f->ino != new_stats.st_ino || f->dev != new_stats.st_dev)    {      new_file = 1;      if (f->fd == -1)	{	  error (0, 0,		 _("`%s' has appeared;  following end of new file"),		 pretty_name (f));	}      else	{	  /* Close the old one.  */	  close_fd (f->fd, pretty_name (f));	  /* File has been replaced (e.g., via log rotation) --	     tail the new one.  */	  error (0, 0,		 _("`%s' has been replaced;  following end of new file"),		 pretty_name (f));	}    }  else    {      if (f->fd == -1)	{	  /* This happens when one iteration finds the file missing,	     then the preceding <dev,inode> pair is reused as the	     file is recreated.  */	  new_file = 1;	}      else	{	  close_fd (fd, pretty_name (f));	}    }  if (new_file)    {      /* Record new file info in f.  */      f->fd = fd;      f->size = 0; /* Start at the beginning of the file...  */      f->dev = new_stats.st_dev;      f->ino = new_stats.st_ino;      f->n_unchanged_stats = 0;      f->n_consecutive_size_changes = 0;      f->ignore = 0;      xlseek (f->fd, f->size, SEEK_SET, pretty_name (f));    }}