fail = "lock";
else if (do_fstat(pid_file_fd, &st1) < 0)
fail = "fstat opened";
- else if (st1.st_size >= (int)sizeof pidbuf)
+ else if (st1.st_size > (int)sizeof pidbuf)
fail = "find small";
else if (do_lstat(pid_file, &st2) < 0)
fail = "lstat";
int len = snprintf(pidbuf, sizeof pidbuf, "%d\n", (int)pid);
#ifndef HAVE_FTRUNCATE
/* What can we do with a too-long file and no truncate? I guess we'll add extra newlines. */
- while (len < st1.st_size) /* We already verified that st_size+1 chars fits in the buffer. */
+ while (len < st1.st_size) /* We already verified that st_size chars fits in the buffer. */
pidbuf[len++] = '\n';
/* We don't need the buffer to end in a '\0' (and we may not have room to add it). */
#endif
extern char *dest_option;
extern char *rsync_path;
extern char *shell_cmd;
-extern char *batch_name;
extern char *password_file;
extern char *backup_dir;
extern char *copy_as;